Why do I get the following NullPointerException when using tools?
[wstools] java.lang.NullPointerException [wstools] at java.lang.System.arraycopy(Native Method) [wstools] at org.apache.xerces.impl.xs.XSModelImpl.getAnnotations(Unknown Source) [wstools] at org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils.copyXSModel(WSSchemaUtils.java:737) [wstools] at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:201) [wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:227) [wstools] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:118) [wstools] at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145) [wstools] at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:121) [wstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:323) [wstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:138) [wstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120) [wstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103) ...
This is a xerces bug that was fixed in 2.7.0. Unfortunately, the latest version of ant comes with 2.6.2. You need to update the xerces jars in your ANT_HOME/lib directory to be at least 2.7.0.
Comments