现有的Netbeans v7.0项目将4个richfaces jar替换为新版本,之后项目被清理并成功构建,glassfish服务器停止运行,Web应用程序部署失败。以下是记录内容的错误亮点:
netbean“Glassfish Server 3.1”选项卡:
...
INFO: WELD-000900 ${parsedVersion (osgiVersion})
SEVERE: Exception while loading the app
SEVERE: Exception while shutting down application container
SEVERE: Exception while shutting down application container : java.lang.NullPointerException
netbean projectname“(run-deploy)”选项卡:
...
Initializing...
deploy?DEFAULT=[path-to-project]/build/web&name=MisThirdPartyUpdate&force=true failed on Glasfish Server 3.1
Error occurred during deployment: Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details.
[path-to-project]/nbproject/build-impl.xml:782:
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187)
at org.netbeans.modules.j2ee.ant.Deploy.execution(Deploy.java:106)
...[14 more levels]
BUILD FAILED (total time: 23 seconds)
server.log文件:
...
SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=36;_ThreadName=Thread-1;|Exception while loading the app[#]
SEVERE|glassfish3.1|javax.enterprise.system.tools.admon.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=Thread-1;|Exception while shutting down application container[#]
SEVERE|glassfish3.1|javax.enterprise.system.tools.admon.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=Thread-1;|Exception while shutting down application container : java.lang.NullPointerException[#]
现在这是一个奇怪的部分,如果我替换项目部署和运行完美的4个richfaces jar文件中的某一个。也就是说,我用richfaces-core-impl-4.0.0.Final.jar替换了richfaces-core-impl-4.2.2.Final.jar,即我有4个来自4.2.2的jar和1个来自4.0.0。正如我之前所说,如果我在构建路径中拥有所有4个Richfaces 4.0.0 jar,项目也将完美部署和运行。
以下是无法部署的项目构建路径中的详尽有序的jar列表:
tomahawk-1.1.8.jar
annotations-4.2.1.Final.jar
log4j-1.2.17.jar
cssparser-0.9.5.jar
guava-11.0.2.jar
hibernate-validator-3.0.0.ga.jar
sac-1.3.jar
richfaces-components-api-4.2.2.Final.jar
richfaces-components-ui-4.2.2.Final.jar
richfaces-core-api-4.2.2.Final.jar
richfaces-core-impl-4.2.2.Final.jar
validation-api-1.0.0.GA.jar
primefaces-3.3.jar
hibernate3.jar
mail.jar
poi-3.2-FINAL-20081019.jar
poi-contrib-3.2-FINAL-20081019.jar
poi-scratchpad-3.2-FINAL-20081019.jar
iText-5.0.4.jar
resolver.jar
xbean.jar
xbean_xpath.jar
xmlbeans-qname.jar
xmlpublic.jar
dom4j-1.6.1.jar
commons-logging-1.1.1.jar
commons-collections-3.2.1.jar
antlr-2.7.6rc1.jar
commons-el-1.0.jar
我正在使用java版本1.6.0_33。
从类似的错误报告"Exception while loading the app" without a stack trace中,我确保两个beans.xml文件都是零长度。此外,基于此报告以及http://www.wobblycogs.co.uk/index.php/computing/jee/53-glassfish-31-exception-while-loading,我确保所有带有“@SessionScope”的bean都实现了Serializable。
对我而言,它将与其中一个richfaces jar的旧版本一起运行应该是一个很大的线索。
任何人都有任何想法???