axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16868] New: - Null pointer exception caused by ProjectResourceBundle
Date Fri, 07 Feb 2003 09:12:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868

Null pointer exception caused by ProjectResourceBundle

           Summary: Null pointer exception caused by ProjectResourceBundle
           Product: Axis
           Version: 1.1beta
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: peter.dahl@tecnomen.com


I'm trying to use Axis from a web application running under Sun ONE Web Server 
6.0SP5. I'm using Java 2 SDK 1.4.1_01. Creating a SOAPMessage with this code 
fails:

  MessageFactory mf = MessageFactory.newInstance();
  SOAPMessage msg = mf.createMessage();

This is the call stack when the error is caught:

 java.lang.ExceptionInInitializerError
   at org.apache.axis.utils.Messages.<clinit>(Messages.java:81)
   at org.apache.axis.Message.isAttachmentSupportEnabled(Message.java:286)
   at org.apache.axis.Message.setup(Message.java:313)
   at org.apache.axis.Message.<init>(Message.java:245)
   at org.apache.axis.soap.MessageFactoryImpl.createMessage
(MessageFactoryImpl.java:91)
   at com.tecnomen.jis.cs.Message.send(Message.java:30)
   at _jsps._html._convertfile_jsp._jspService(_convertfile_jsp.java:269)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:248)
   at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$6
(JspServlet.java:238)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:519)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:588)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService
(NSServletRunner.java:919)
   at com.iplanet.server.http.servlet.WebApplication.service
(WebApplication.java:1061)
   at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp
(NSServletRunner.java:981)
   Caused by: java.lang.NullPointerException
   at java.util.ResourceBundle.getBundle(ResourceBundle.java:659)
   at org.apache.axis.i18n.ProjectResourceBundle$Context.loadBundle
(ProjectResourceBundle.java:452)
   at org.apache.axis.i18n.ProjectResourceBundle.getBundle
(ProjectResourceBundle.java:350)
   at org.apache.axis.i18n.ProjectResourceBundle.getBundle
(ProjectResourceBundle.java:320)
   at org.apache.axis.i18n.MessagesConstants.<clinit>
(MessagesConstants.java:71)   ... 17 more    

The problem is caused by ProjectResourceBundle passing a null ClassLoader 
parameter to java.util.ResourceBundle.getBundle. I got it to run by making this 
change in ProjectResourceBundle:

        void setLoader(ClassLoader l) {
            _loader = (l != null) ? l : this.getClass().getClassLoader();
	    // PMD 20030205
	    if (_loader == null) {
		_loader = ClassLoader.getSystemClassLoader();
	    }
        }

Mime
View raw message