“加载应用时异常”没有堆栈跟踪 [英] "Exception while loading the app" without a stack trace

查看:156
本文介绍了“加载应用时异常”没有堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的应用程序从GlassFish 3.0.1迁移到GlassFish 3.1.1。部署失败,并显示以下错误消息:

 严重:加载应用程序时异常
SEVERE:关闭时异常应用程序容器
SEVERE:关闭应用程序容器时异常:java.lang.NullPointerException
SEVERE:java.lang.RuntimeException:部署期间发生错误:关闭应用程序容器时出现异常:java.lang.NullPointerException。有关详细信息,请参阅server.log。

没有堆栈跟踪。我打开根日志记录级别到FINEST,第一个SEVERE消息发生在Weld消息之后:

  // ... 
FINE:WELD-000105启用管理员的拦截器类型
已启用备选方案:[] []
注册上下文:[interface javax.enterprise.context.SessionScoped,interface javax.enterprise.context.RequestScoped ,接口javax.inject.Singleton,接口javax.enterprise.context.Dependent,接口javax.enterprise.context.ApplicationScoped,接口javax.enterprise.context.ConversationScoped]
注册的bean:0
专业bean: 0
:[]

在几个类似这样的消息之前(对于几个不同的类):

  FINE:PWC4451:无法读取文件/opt/sun/glassfish-3.1.1/glassfish/domains/domain1/applications /QmsWeb/WEB-INF/classes/org/jboss/seam/transaction/SeamT​​ransaction.class 
FINE:PWC4451:无法读取文件/opt/sun/glassfish-3.1.1/glassfish/domains/domai n1 / applications / QmsWeb / WEB-INF / classes / org / jboss / seam / transaction / SeamT​​ransaction.class
FINE:PWC4451:无法读取文件/opt/sun/glassfish-3.1.1/glassfish/domains/ domain1 / applications / QmsWeb / WEB-INF / classes / net / sf / ehcache / config / TerracottaConfiguration $ ValueMode.class
// ...

可能会导致此错误?这些PWC4451消息是否指示某些库未被加载?

解决方案

这是由于一个@ViewScoped bean不实现Serializable。显然,我们使用的较旧版本的Weld并没有发现令人厌恶的是,钝化范围的bean不是可序列化的,但是由于这个原因,这个bean无声地失败了。哦,希望这样可以节省一些时间。


I'm migrating my app from GlassFish 3.0.1 to GlassFish 3.1.1. Deployment fails, with the following error messages:

SEVERE: Exception while loading the app
SEVERE: Exception while shutting down application container
SEVERE: Exception while shutting down application container : java.lang.NullPointerException
SEVERE: java.lang.RuntimeException: Error occurred during deployment: Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details. 

There is no stack trace. I turned on the root logging level to FINEST, and the first SEVERE message occurs after a Weld message:

//...
FINE: WELD-000105 Enabled interceptor types for Manager
Enabled alternatives: [] []
Registered contexts: [interface javax.enterprise.context.SessionScoped, interface javax.enterprise.context.RequestScoped, interface javax.inject.Singleton, interface javax.enterprise.context.Dependent, interface javax.enterprise.context.ApplicationScoped, interface javax.enterprise.context.ConversationScoped]
Registered beans: 0
Specialized beans: 0
: []

And before several messages like these (for several different classes):

FINE: PWC4451: File cannot be read /opt/sun/glassfish-3.1.1/glassfish/domains/domain1/applications/QmsWeb/WEB-INF/classes/org/jboss/seam/transaction/SeamTransaction.class
FINE: PWC4451: File cannot be read /opt/sun/glassfish-3.1.1/glassfish/domains/domain1/applications/QmsWeb/WEB-INF/classes/org/jboss/seam/transaction/SeamTransaction.class
FINE: PWC4451: File cannot be read /opt/sun/glassfish-3.1.1/glassfish/domains/domain1/applications/QmsWeb/WEB-INF/classes/net/sf/ehcache/config/TerracottaConfiguration$ValueMode.class
//...

What could be causing this error? Could these PWC4451 messages be indicating that some libraries aren't being loaded?

解决方案

This was due to a @ViewScoped bean that did not implement Serializable. Apparently, an older version of Weld that we were using didn't find it objectionable that a passivating-scoped bean wasn't Serializable, but this one failed silently because of it. Oh well, hope this saves someone some time.

这篇关于“加载应用时异常”没有堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆