Hi Cheng,
Cheng Fang wrote:
> Hi,
>
> I'm seeing the following exception when deploying my app to a recent
> nightly build. I couldn't figure out what could've caused the NPE.
> Turning on logging FINE in web-container didn't give more details.
> Verifier also reported success on my app.
>
> I searched a few modules in my glassfish workspace but couldn't find
> where this NPE is from (I don't have all modules in my workspace).
> Although the error message says the web module has been disabled, I
> can still access this webapp, except a servlet filter is not invoked.
>
> Could someone shed light on this?
>
> Thanks,
> -cheng
>
> [#|2007-08-02T04:18:34.078-0400|INFO|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=15;_
>
> ThreadName=httpWorkerThread-4848-0;ejb3_assembly_metainfandlibdir;|LDR5010:
> All ejb(s) of [ejb3_assembly_metai
> nfandlibdir] loaded successfully!|#]^M
> ^M
> [#|2007-08-02T04:18:34.093-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=15;_Th
>
> readName=httpWorkerThread-4848-0;/ejb3_assembly_metainfandlibdir;java.lang.NullPointerException;_RequestID=63c
>
> 9ee02-0fcd-45c8-a681-e8b600cc0f03;|WEB0600: WebModule
> [/ejb3_assembly_metainfandlibdir] failed to deploy and h
> as been disabled: [java.lang.NullPointerException].|#]^M
It is unfortunate that the exception is swallowed like that, without
giving any stacktrace.
Can you please try out the attached patch, which will log the
exception's stacktrace?
Hopefully, that will give you and Hong the information you are looking for.
Thanks!
Jan
> ^M
> [#|2007-08-02T04:18:34.937-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=15;_Thread
>
> Name=httpWorkerThread-4848-0;C:/ws/sjsas90/publish/glassfish/domains/domain1\generated\xml\j2ee-apps\ejb3_asse
>
> mbly_metainfandlibdir\ejb3_assembly_metainfandlibdirClient.jar;|ADM1040:Client-jar
> location:[C:/ws/sjsas90/pub
> lish/glassfish/domains/domain1\generated\xml\j2ee-apps\ejb3_assembly_metainfandlibdir\ejb3_assembly_metainfand
>
> libdirClient.jar]|#]^M
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
Index: WebModuleContextConfig.java
===================================================================
RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/WebModuleContextConfig.java,v
retrieving revision 1.12
diff -u -r1.12 WebModuleContextConfig.java
--- WebModuleContextConfig.java 5 May 2007 05:36:02 -0000 1.12
+++ WebModuleContextConfig.java 2 Aug 2007 17:50:54 -0000
@@ -241,9 +241,11 @@
webBundleDescriptor);
} catch (Throwable t){
context.setAvailable(false);
- Object[] objs = {context.getName(), t};
- logger.log(Level.SEVERE,
- "webModuleContextConfig.webModuleDisabled", objs);
+ String msg = _rb.getString(
+ "webModuleContextConfig.webModuleDisabled");
+ msg = MessageFormat.format(msg,
+ new Object[] { context.getName() });
+ logger.log(Level.SEVERE, msg, t);
}
context.setConfigured(false);
Index: LogStrings.properties
===================================================================
RCS file: /cvs/glassfish/appserv-commons/src/java/com/sun/logging/enterprise/system/container/web/LogStrings.properties,v
retrieving revision 1.39
diff -u -r1.39 LogStrings.properties
--- LogStrings.properties 10 Jul 2007 19:44:19 -0000 1.39
+++ LogStrings.properties 2 Aug 2007 17:51:47 -0000
@@ -216,7 +216,7 @@
webmodule.alternateDocBase.illegalUrlPattern=WEB0504: URL pattern {0} for alternate docbase is invalid
webmodule.alternateDocBase.crlfInUrlPattern=WEB0505: URL pattern {0} for alternate docbase contains CR or LF or both
-webModuleContextConfig.webModuleDisabled=WEB0600: WebModule [{0}] failed to deploy and has been disabled: [{1}].
+webModuleContextConfig.webModuleDisabled=WEB0600: WebModule [{0}] failed to deploy and has been disabled
webModuleContextConfig.missingDefaultWeb.xml=WEB0601: Missing default web.xml, using application web.xml only
webModuleContextConfig.defaultMissing=WEB0602: Missing default-web.xml, using application web.xml only
webModuleContextConfig.defaultParse=WEB0603: Parse error in default-web.xml