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)