NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Mon Feb 21, 2011 2:22 pm Post subject: "Lookup failed in SerialContext" when deploying on remote server - SOLVED |
|
|
This is actually two problems (probably).
I have a freshly installed Glassfish 3.0.1 and NetBeans 6.9.1, both on my desktop. I have created a connection pool to a MySQL server (works fine), then created an entity class based on one of the tables and a jsf page from the entity class. All of this works fine, and when I press "Run", it shows up in my browser.
However, I have now installed exactly the same Glassfish server on a remote machine with the same connection pool (which works). I can create the entity class, but the jsf page isn't created, although there is no error message. I have had it working before, though, so this is probably something I can fix myself.
However, a more serious problem that I have had all along is that when I try to deploy to the server, I get something like:
Lookup failed for 'mysql.infares' in SerialContext
- where 'mysql.infares' is the JNDI I used from NetBeans to look up the table for the entity class in the first place, so you would have thought it would know it. On the other hand, it isn't listed explicitly under JNDI on the server. I have seen a number of references to this problem on the net, but they don't seem to apply to my situation. Any suggestions?
Last edited by janpla on Tue Feb 22, 2011 2:44 pm; edited 1 time in total |
|
| Back to top |
|
 |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Mon Feb 21, 2011 3:42 pm Post subject: |
|
|
OK, a bit of development:
I uninstalled the remote Glassfish and reinstalled; now the problem with generating jsf pages has gone away.
However, I still can't deploy - from NetBeans I get:
| Code: | init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: /repo/root/staf/test/WebApplication1/build/web/WEB-INF/classes
Created dir: /repo/root/staf/test/WebApplication1/build/web/META-INF
Copying 1 file to /repo/root/staf/test/WebApplication1/build/web/META-INF
Created dir: /repo/root/staf/test/WebApplication1/build/web/WEB-INF/classes/META-INF
Copying 1 file to /repo/root/staf/test/WebApplication1/build/web/WEB-INF/classes/META-INF
Copying 10 files to /repo/root/staf/test/WebApplication1/build/web
library-inclusion-in-archive:
library-inclusion-in-manifest:
Created dir: /repo/root/staf/test/WebApplication1/build/empty
Created dir: /repo/root/staf/test/WebApplication1/build/generated-sources/ap-source-output
Compiling 7 source files to /repo/root/staf/test/WebApplication1/build/web/WEB-INF/classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 1 file to /repo/root/staf/test/WebApplication1/build/web/WEB-INF/classes
compile:
compile-jsps:
Created dir: /repo/root/staf/test/WebApplication1/dist
Building jar: /repo/root/staf/test/WebApplication1/dist/WebApplication1.war
Distributing /repo/root/staf/test/WebApplication1/dist/WebApplication1.war to [GlassFish Server 3]
Initializing...
deploy?path=/repo/root/staf/test/WebApplication1/dist/WebApplication1.war&name=WebApplication1&force=true failed on GlassFish Server 3
/repo/root/staf/test/WebApplication1/nbproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED (total time: 4 seconds)
|
- and when I try to deploy through the web-interface to the server, I get:
| Code: |
Error An error has occurred
Exception while preparing the app : java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'mysql.infares' in SerialContext [Root exception is javax.naming.NameNotFoundException: mysql.infares not found]
|
|
|
| Back to top |
|
 |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Tue Feb 22, 2011 2:42 pm Post subject: |
|
|
I found a solution - but not an answer:
On a hunch I went and installed NetBeans on the server, since I don't have this problem on my desktop machine; and I noticed that GlassFish comes packaged with NetBeans. When I use this server, it works fine. So, a solution, but no real understanding. |
|
| Back to top |
|
 |
MarkB52
Joined: 25 Feb 2011 Posts: 2
|
Posted: Fri Feb 25, 2011 9:38 am Post subject: |
|
|
Try changing your JDBC Resource name to "infares" instead of "mysql.infares". This trick worked for me in being able to deploy an app without putting NetBeans onto the target server.
See [url]http://forums.netbeans.org/viewtopic.php?p=99051#99051[/url] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|