You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Martin Both (JIRA)" <ji...@apache.org> on 2015/10/14 11:58:05 UTC

[jira] [Created] (OPENEJB-2117) Missing WSDL file in classpath ends in NullPointerException

Martin Both created OPENEJB-2117:
------------------------------------

             Summary: Missing WSDL file in classpath ends in NullPointerException
                 Key: OPENEJB-2117
                 URL: https://issues.apache.org/jira/browse/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(WsDeployer.java:451)
	at org.apache.openejb.config.WsDeployer.getWsdl(WsDeployer.java:427)
	at org.apache.openejb.config.WsDeployer.processPorts(WsDeployer.java:209)


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
(v6.3.4#6332)