Sorry but the server.og doesn't say anything about EclipseLink. I did some debugging and it the emf/EntityManagerFactory gets injected properly. But when the factory tries to create an EntityManager in:
public BookDBAO(EntityManagerFactory emf) throws Exception {
em = emf.createEntityManager();
An IllegalStateException gets thrown:
Unable to retrieve EntityManagerFactory for unitName null
The complete server.log is:
Jul 23, 2009 11:11:56 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
C:\Programme\Java\jdk1.6.0_14\bin\java.exe
-cp
E:/glassfishv3/glassfish/modules/glassfish.jar
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=E:\glassfishv3\glassfish\domains\domain1/logs/jvm.log
-Xmx512m
-client
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.net.ssl.trustStore=E:\glassfishv3\glassfish\domains\domain1/config/cacerts.jks
-Djavax.net.ssl.keyStore=E:\glassfishv3\glassfish\domains\domain1/config/keystore.jks
-Djava.security.policy=E:\glassfishv3\glassfish\domains\domain1/config/server.policy
-Dcom.sun.aas.instanceRoot=E:\glassfishv3\glassfish\domains\domain1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.security.auth.login.config=E:\glassfishv3\glassfish\domains\domain1/config/login.conf
-Djava.endorsed.dirs=E:\glassfishv3\glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=E:\glassfishv3\glassfish
-Djava.ext.dirs=C:\Programme\Java\jdk1.6.0_14/lib/ext;C:\Programme\Java\jdk1.6.0_14/jre/lib/ext;E:\glassfishv3\glassfish\domains\domain1/lib/ext;E:\glassfishv3\javadb/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
start-domain,,,--domaindir,,,E:/glassfishv3/glassfish/domains,,,--debug,,,--verbose=false,,,domain1
-instancename
server
-verbose
false
-debug
true
-asadmin-classpath
E:/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-domaindir
E:/glassfishv3/glassfish/domains/domain1
Jul 23, 2009 11:11:57 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 31 msec.
INFO: Started bundle org.glassfish.common.internal-api [115]
INFO: Started bundle org.glassfish.transaction.jts [150]
INFO: Started bundle org.glassfish.deployment.autodeploy [61]
INFO: Started bundle org.glassfish.jms.core [136]
INFO: Started bundle org.glassfish.registration.glassfish-registration [95]
INFO: Started bundle org.glassfish.flashlight.framework [74]
INFO: Listening on port 8080
INFO: Network listener http-listener-2 on port 8181 disabled per domain.xml
INFO: Listening on port 4848
INFO: Started bundle org.glassfish.common.container-common [57]
INFO: Started bundle org.glassfish.common.glassfish-api [82]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Started bundle org.glassfish.deployment.common [63]
INFO: Started bundle org.glassfish.common.glassfish-naming [93]
INFO: Started bundle org.glassfish.transaction.jta [149]
INFO: Started bundle org.glassfish.connectors.runtime [47]
INFO: GlassFish v3 startup time : Felix(1828ms) startup services(750ms) total(2578ms)
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: felix.fileinstall.poll (ms) 5000
INFO: felix.fileinstall.dir E:\glassfishv3\glassfish\domains\domain1\autodeploy-bundles
INFO: felix.fileinstall.debug 1
INFO: felix.fileinstall.bundles.new.start true
INFO: Started JMXConnector, JMXService URL = service:jmx:rmi:///jndi/rmi://taiPad:8686/jmxrmi
INFO: Started bundle org.glassfish.webservices.jsr109-impl [145]
INFO: Started bundle org.glassfish.ejb.gf-ejb-connector [78]
INFO: Started bundle org.glassfish.web.gf-web-connector [80]
INFO: Started bundle org.glassfish.appclient.server.appclient-connector [20]
INFO: Started bundle org.glassfish.web.beans-integration [192]
INFO: Started bundle org.glassfish.security [177]
INFO: Started bundle org.glassfish.deployment.javaee-full [65]
INFO: Started bundle org.glassfish.persistence.jpa-connector [138]
INFO: Started bundle org.glassfish.connectors.gf-connectors-connector [77]
INFO: Started bundle org.glassfish.scripting.gf-jruby-connector [79]
INFO: Started bundle org.glassfish.extras.osgi-container [170]
INFO: Started bundle org.glassfish.extras.grizzly-container [101]
INFO: Started bundle org.glassfish.deployment.admin [60]
INFO: Started bundle org.glassfish.web.war-util [185]
INFO: SEC1002: Security Manager is OFF.
INFO: Started bundle org.glassfish.security.common [178]
INFO: Started bundle org.glassfish.security.webservices.security [196]
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Started bundle org.glassfish.security.realms [173]
INFO: Security service(s) started successfully....
INFO: Started bundle org.glassfish.web.glue [189]
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Started bundle org.glassfish.deployment.dol [66]
INFO: Started bundle org.glassfish.ejb.ejb-container [67]
INFO: Started bundle org.glassfish.web.core [188]
INFO: Dual registration of jndi stream handler: factory already defined
INFO: Unknown loader 189.0 class org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader
INFO: Started bundle org.glassfish.web.jstl-connector [147]
INFO: Started bundle org.glassfish.web.jsf-connector [140]
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: Started bundle org.glassfish.connectors.work-management [197]
INFO: Started bundle org.glassfish.connectors.internal-api [46]
INFO: Started bundle org.glassfish.deployment.javaee-core [64]
INFO: DOL Loading time313
INFO: Started bundle org.glassfish.security.websecurity [194]
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader_at_74d22e class org.glassfish.internal.api.DelegatingClassLoader
INFO: Started bundle org.glassfish.orb.connector [157]
INFO: Started bundle org.glassfish.orb.iiop [158]
INFO: Couldn't create bookstore database bean: Unable to retrieve EntityManagerFactory for unitName null
INFO: Loading application bookstore1 at /bookstore1
INFO: Deployment of bookstore1 done is 52,031 ms
HTH Tai
[Message sent by forum member 'taitruong' (taitruong)]
http://forums.java.net/jive/thread.jspa?messageID=357311