2

一个现有且正在运行的 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 项目名称“(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 文件中的某个 1 个,项目部署和运行完美。也就是说,我用richfaces-core-impl-4.0.0.Final.jar替换了richfaces-core-impl-4.2.2.Final.jar,即我有3个来自4.2.2的jar和1个来自4.0.0的jar。正如我之前所说,如果我在构建路径中有所有 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。

在没有堆栈跟踪的类似错误报告“加载应用程序时出现异常”中,我确保两个 beans.xml 文件的长度都为零。此外,根据这份报告以及http://www.wobblycogs.co.uk/index.php/computing/jee/53-glassfish-31-exception-while-loading,我确保我所有的豆子都带有“@ SessionScope”实现了可序列化。

对我来说,它将与其中一个richfaces jar 的旧版本一起运行这一事实应该是一个很大的线索。

有人有想法么???

4

0 回答 0