JNDI lookup fails in Glassfish
I am working on a web project using maven.When I run the server on net-beans 6.8,the build is succes,but when deploying to server I am getting lookup failed exception.Please find the server log in the following url http://pastie.org/1997218. Let me know What I have missed here. The stack trace for the error is
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/deliver' in SerialContext [Root exception is javax.naming.NameNotFoundException: deliver not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init> (PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.开发者_开发问答v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
...
As it seems your production server is missing the database resource jdbc/deliver
your application needs. You have configured it properly for your test instance in NetBeans. Have a look at the Services tab in NetBeans and make sure you have a similar database set up on your server.
精彩评论