PetStore+glassfish 的问题
我下载了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不能运行
请各位大哥帮我,谢谢
相关推荐
PetStore_2.0_有源码
这是sun最新的petStore项目,内含源代码。 可以部署成功。 env: ant1.7 jdk1.6 glassfish2.1 或netbean
petstore1.3.102源码及安装说明
petstore1.3.102源码及安装说明,按照说明一步步 绝对可以成功,绝对适合初学者。
使用 Java EE 6 的 Java Petstore.zip
应用程序 - Petstore Java EE 6作者Antonio Goncalves级别中级技术Java EE 6(JPA 2.0、CDI 1.0、Bean Validation 1.0、EJB Lite 3.1、JSF 2.0、JAX-RS 1.1)应用服务器GlassFish 3.x、JBoss 7.x、TomEE 1.x摘要使用 Java EE 6 开发类似 Petstore 的应用程序从 GitHub 下载代码本申请的目的您还记得老牌的 Java Petstore吗?它是 Sun 为其Java BluePrints程序创建的一个示例应用程序。Java Petstore 旨在说明如何使用 J2EE(然后是 Java EE)开发电子商务 Web 应用程序。没错,Petstore 的目的是在线销售宠物。Petstore 势头强劲,我们开始看到大量类似 Petstore 的应用程序蓬勃发展。这个想法是使用某种技术构建应用程序。让我们面对现实吧,J2EE 版本过于复杂,使用了大量(今天已经过时的)设计模式。当我在 2006 年撰写Java EE 5 书籍时,
OSGi原理与最佳实践(精选版)
OSGi,OSGi原理与最佳实践(精选版),对于想学习OSGI基本原理和开发方法的同志十分有用
OSGi 入门教程(mini)
osgi的首个入门教材,简单易读,需要的话就支持一下.......


Web 开发
