我正在將我的應用程序從GlassFish 3.0.1遷移到GlassFish 3.1.1。部署失敗,並顯示以下錯誤消息:「沒有堆棧跟蹤時加載應用程序時出現異常」
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.
沒有堆棧跟蹤。我打開根日誌記錄級別爲FINEST和焊縫消息後發生的第一嚴重的消息:
//...
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
: []
而之前像這樣的幾個消息(幾個不同的類):
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
//...
有什麼事情引起這個錯誤?這些PWC4451消息是否表明某些庫沒有被加載?
這看起來好像無處可去。如果任何開發工具程序員看到這一點,請記住:良好的錯誤消息是一個功能! – Nick
這實際上被標記爲Glassfish問題,應該在Glassfish 4.0中修復,以解決該問題。請參閱http://java.net/jira/browse/GLASSFISH-18599,不幸的是,這無助於你或我現在。 –