Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7969

NullPointerException in CXF JavaToWS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.3.1, 3.2.9
    • Component/s: Core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      NullPointerException in CXF JavaToWS.

      There is a bug in isBuiltInTypes functions.

      This line throws NullPointerException  if getPackage returns null.

      return "java.lang".equals(clz.getPackage().getName());

      This happens for the following array, for example:

      StratSystem[][] systems

      Argument of isBuiltInTypes: Class: class [Lcom.nomura.at.webservices.dto.StratSystem; getPackage null

       

      Stack trace:

           [java] Error: java.lang.NullPointerException
           [java] java.lang.NullPointerException
           [java]     at org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.Wrapper.isBuiltInTypes(Wrapper.java:185)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.Wrapper.getTypeString(Wrapper.java:205)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.RequestWrapper.buildFields(RequestWrapper.java:75)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.RequestWrapper.buildFields(RequestWrapper.java:62)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.Wrapper.buildWrapperBeanClass(Wrapper.java:130)
           [java]     at org.apache.cxf.tools.java2wsdl.generator.wsdl11.WrapperBeanGenerator.generateBeanClasses(WrapperBeanGenerator.java:41)
           [java]     at org.apache.cxf.tools.java2wsdl.generator.wsdl11.BeanGenerator.generate(BeanGenerator.java:55)
           [java]     at org.apache.cxf.tools.java2wsdl.generator.wsdl11.BeanGenerator.generate(BeanGenerator.java:35)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.generate(JavaToWSDLProcessor.java:156)
           [java]     at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(JavaToWSDLProcessor.java:118)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSContainer.java:116)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:81)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:79)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWS.main(JavaToWS.java:47)
           [java] JavaToWS Error: org.apache.cxf.tools.common.ToolException
           [java] org.apache.cxf.tools.common.ToolException
           [java]     at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:107)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
           [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:79)
           [java]     at org.apache.cxf.tools.java2ws.JavaToWS.main(JavaToWS.java:47)

       

       

       

       

        Attachments

        1. StratSystem.java
          0.4 kB
          Dmitry Firsakov
        2. TestImpl.java
          0.8 kB
          Dmitry Firsakov

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              DmitryF Dmitry Firsakov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: