Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2117

Missing WSDL file in classpath ends in NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (not version related)
    • None
    • container system
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            maboth Martin Both
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: