tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Both (JIRA)" <>
Subject [jira] [Created] (OPENEJB-2117) Missing WSDL file in classpath ends in NullPointerException
Date Wed, 14 Oct 2015 09:58:05 GMT
Martin Both created OPENEJB-2117:

             Summary: Missing WSDL file in classpath ends in NullPointerException
                 Key: OPENEJB-2117
             Project: OpenEJB
          Issue Type: Bug
          Components: container system
    Affects Versions: (not version related)
            Reporter: Martin Both

I use the annotation @WebService(wsdlLocation=…) in my service implementation to specify
a wsdl file in my class path.
And I'm using TomEE with OpenEJB 4.7.2.

If my wsdl file is not in the class path I would expect an error message
but I have get a NullPointerException.

Caused by: java.lang.NullPointerException
	at org.apache.openejb.config.WsDeployer.readWsdl(
	at org.apache.openejb.config.WsDeployer.getWsdl(
	at org.apache.openejb.config.WsDeployer.processPorts(

In class org.apache.openejb.config.WsDeployer
at line 425 the wsdl url is created with
      final URL wsdlUrl = module.getClassLoader().getResource()
Attention: wsdlUrl is null if the resource is missing!
So readWsdl(wsdlUrl = null) at line 427 does not work!
The error handling routine at line 451 calls url.toExternalForm().
This results in a NullPointerException because url is null.

Please give a valid ErrorMessage if getResource() returns null and don't throw a NullPonterException.

Best regards
Martin Both

This message was sent by Atlassian JIRA

View raw message