PetStore+glassfish 的问题
先声明,我是新手,刚学jsp没几天
我下载了petstore 2.0和NetBeans IDE 6.0
在此前装了java ee 5
(在装java ee 5的时候应该有内嵌的glassfish v2 (端口:8080,管理端口:4848),
后来装了个NetBeans ,有先择装了glassfish v2(端口:8081,管理端口:4849)
所以,以我的理解系统应该是有两个glassfish v2)
因为java ee 5自带了个petstore,我能够把petstore架起来运行
但是我用NetBeans 架了个petstore 2.0,服务器使用安装netbeans时的glassfish v2,编译通过,但是不能运行,错误如下:
Trying to create reference for application in target server completed successfully
Trying to start application in target server completed successfully
Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy.
WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: java.lang.RuntimeException: javax.naming.NameNotFoundException
--------------------------------------------------
glassfish 错误如下:
CORE5051: Shutting down all J2EE applications ...
CORE 5060 : Stopping all J2EE Connector 1.5 Compliant resource adapters ...
CORE 5061 : Resource adapters Stop() Complete
CORE5052: Application shutdown complete.
[AutoDeploy] Disabling AutoDeployment service.
JBIFW0042: JBI framework termination complete.
2007-12-28 16:39:39 com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
信息:
C:/Program Files/Java/jdk1.6.0_03\bin\java
....
....
WEB0302: Starting Sun-Java-System/Application-Server.
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8081
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8182
WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4849
naming.bind
Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/petstore,J2EEApplication=null,J2EEServer=server
WEB0207: Error starting web context StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/petstore] on virtual server server
java.lang.RuntimeException: java.lang.RuntimeException: javax.naming.NameNotFoundException
at com.sun.enterprise.web.WebModuleListener.loadPersistenceUnits(WebModuleListener.java:193)
..... at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException
at com.sun.enterprise.server.PersistenceUnitInfoImpl._getJtaDataSource(PersistenceUnitInfoImpl.java:283)
....
Caused by: javax.naming.NameNotFoundException
at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:268)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:191)
....._getJtaDataSource(PersistenceUnitInfoImpl.java:281)
... 17 more
SMGT0007: Self Management Rules service is enabled
Application server startup complete.
ContainerBase.removeChild: stop:
LifecycleException: PWC2769: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:787)
......
.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
deployed with moduleid = javapetstore-2.0-ea5
naming.bind
PWC1311: Error stopping context StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/petstore]
LifecycleException: PWC1644: Loader has not yet been started
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:770)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5381)
......Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/petstore,J2EEApplication=null,J2EEServer=server
WEB0123: WebModule [javapetstore-2.0-ea5] failed to deploy and has been disabled
java.lang.RuntimeException: java.lang.RuntimeException: javax.naming.NameNotFoundException
at com.sun.enterprise.web.WebModuleListener.loadPersistenceUnits(WebModuleListener.java:193)
server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:84)
at com.sun.enterprise.web.WebModuleListener.loadPersistenceUnits(WebModuleListener.java:190)
.lookupPMResource(ConnectorRuntime.java:1098)
at com.sun.enterprise.server.PersistenceUnitInfoImpl.lookupPMDataSource(PersistenceUnitInfoImpl.java:294)
at com.sun.enterprise.server.PersistenceUnitInfoImpl._getJtaDataSource(PersistenceUnitInfoImpl.java:281)
... 81 more
ADM5603:Event listener error [java.lang.RuntimeException: javax.naming.NameNotFoundException]
ADM1075:Error on listening event:[java.lang.RuntimeException: javax.naming.NameNotFoundException]
WEB0303: Stopping Sun-Java-System/Application-Server.
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8081
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8182
WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 4849
CORE5051: Shutting down all J2EE applications ...
CORE 5060 : Stopping all J2EE Connector 1.5 Compliant resource adapters ...
CORE 5061 : Resource adapters Stop() Complete
CORE5052: Application shutdown complete.
[AutoDeploy] Disabling AutoDeployment service.
JBIFW0042: JBI framework termination complete.
-------------------------------------------------------------------------
http://localhost:4849是可以访问的,javadb端口也侦听正常
当然如果我在项目中选用java ee 中的glassfish来运行可能会正常,但是我不明白为什么用这个glassfish不能运行
请各位大哥帮我,谢谢