glassfish v2部署与glassfish v3 tp2部署不一样?

szhswl 2008-07-05

最近对glassfish挺感兴趣的,就下了最新的glassfishv3tp2及glassfishv2,先安装了v3tp2,在上面部署了项目,测试等等,都很顺利,就是功能少了点,所以立马安装了v2,想尝试更多的功能,安装也很顺利,网上安装资料也挺多嘛,但在v2上部署项目时,出错了,而且同样的项目部署过程在v3中可以,在v2中就报如下错误:

 

[#|2008-07-05T14:46:27.109+0800|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=24;_ThreadName=Thread-694;cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected.;_RequestID=d6aa3e77-c4eb-4560-b959-4a8ef1d2e6bf;|"DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected."|#]

[#|2008-07-05T14:46:27.125+0800|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=24;_ThreadName=Thread-694;_RequestID=d6aa3e77-c4eb-4560-b959-4a8ef1d2e6bf;|Exception occured in J2EEC Phaseorg.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected.
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [moss] Line 13 Column 19 -- Deployment descriptor file WEB-INF/web.xml in archive [webapps].  cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected.
 at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:380)
 at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:423)
 at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:157)
 at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:179)
 at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
 at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
 at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
 at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
 at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://java.sun.com/xml/ns/j2ee":jsp-file}' is expected.
 at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:304)
 at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:226)
 at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:480)
 at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:305)
 at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
 at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:763)
 at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:744)
 at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:349)
 ... 10 more

 

 

没辙了,就在这里请教大家。

szhswl 2008-07-06
问题解决了,是web.xml配置有多余的节点,自己的问题。

但这意思也就是说,v3里对web.xml节点验证很宽松?呵呵。。

今天又测试了v2(用jmeter 50个线程循环2次),发现用dbcp数据库连接池时出现了问题,与在tomcat里一样,出现了错误:
java.lang.IllegalStateException: Pool not open
at org.apache.commons.pool.BaseObjectPool.assertOpen(BaseObjectPool.java:78)
at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:916)
at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:87)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
是在关闭连接时出现的,但同样的代码,同样用dbcp数据库连接池,同样用jmeter 50个线程循环2次甚至更高,都没出现问题。

最后在v2里配置了连接池,发现了在v3里配置的连接池,一用(jmeter 50个线程2次循环)机器就挂了(内存占用98%),而用v2连接池测试没有问题,当然还是指同样的代码,同样的测试环境,只是用v3还是v2的连接池。。
魔力猫咪 2008-07-06
V3还是相当早期的版本。所以只能用来看看,了解一下新功能。暂时还不适合用于开发和部署。
szhswl 2008-07-07
嗯,谢谢。
judytang 2008-07-08
谢谢SZHSWL朋友试用GLASSFISH。  也谢谢猫咪的回复,希望多在GLASSFISH圈子交流,如果这里解决不了,也可以给GLASSFISH开BUG
dinghy 2008-10-06
感谢楼主的小白鼠精神~~~问下,fishcat计划多久后出release
judytang 2008-11-03
我们的FishCAT测试GF V3已经结束了,感谢猫咪和DINGHY噢,GF V3 PRELUDE 正式版已经可以下载了,11/6号我们会宣布GF V3 PRELUDE 发行。

具体请到水族馆看这条消息:

http://blogs.sun.com/theaquarium_zh/entry/glassfish_v3_prelude_11_%E6%9C%88

谢谢朋友们,继续发扬光大小白鼠精神 :)

JUDY
Global site tag (gtag.js) - Google Analytics