You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Aaron Gourley (JIRA)" <ji...@apache.org> on 2008/03/19 14:48:55 UTC
[jira] Created: (AXIS2-3634) NullPointerException during codegen
when using JaxB RI databinding
NullPointerException during codegen when using JaxB RI databinding
------------------------------------------------------------------
Key: AXIS2-3634
URL: https://issues.apache.org/jira/browse/AXIS2-3634
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: codegen
Affects Versions: 1.3, 1.4
Environment: Windows XP, Java 6
Reporter: Aaron Gourley
I was able to get around the following exception by replacing org.apache.axis2.jaxbri.CodeGenerationUtility line 125 of Axis2 1.4 RC1 as follows (in anonymous EntityResolver.resolveEntity())
Replace this: if (key.getTargetNamespace().equals(publicId)) {
With this: if (key.getTargetNamespace() != null && key.getTargetNamespace().equals(publicId)) {
Additionally, I'm not sure if it would be acceptable to skip the for loop all together if publicId is null.
The exception that I encountered was:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
... 3 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:307)
... 8 more
Caused by: java.lang.NullPointerException
at org.apache.axis2.jaxbri.CodeGenerationUtility$1.resolveEntity(CodeGenerationUtility.java:125)
at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:296)
at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:95)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:394)
at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:274)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148)
at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:193)
... 8 more
I will attach a WSDL that exploits this issue and the WSDL2Java parameters used.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3634) NullPointerException during codegen
when using JaxB RI databinding
Posted by "Aaron Gourley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580373#action_12580373 ]
Aaron Gourley commented on AXIS2-3634:
--------------------------------------
WSDL2Java arguments:
-p com.redknee.service.parlayx.location.wsdl
-o /tmp/build\InterfaceParlayx\trunk\/interface/parlayx\trunk
-S src\java
-R classes\com\redknee\service\parlayx\location\wsdl\axis2
-sn TerminalLocation
-pn TerminalLocation
-g
-ss
-ssi
-sd
-d jaxbri
-wv 1.1
-ns2p http://www.csapi.org/schema/parlayx/common/v2_0=com.redknee.service.parlayx.location.wsdl.axis2.common,http://www.csapi.org/schema/parlayx/terminal_location/v2_0=com.redknee.service.parlayx.location.wsdl.axis2.terminal.location,http://www.csapi.org/schema/parlayx/terminal_location/v2_0/local=com.redknee.service.parlayx.location.wsdl.axis2.terminal.location.local -u -uri /redknee//interface/parlayx/trunk\src/wsdl/parlayx_terminal_location_service_2_0.wsdl
> NullPointerException during codegen when using JaxB RI databinding
> ------------------------------------------------------------------
>
> Key: AXIS2-3634
> URL: https://issues.apache.org/jira/browse/AXIS2-3634
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.4, 1.3
> Environment: Windows XP, Java 6
> Reporter: Aaron Gourley
>
> I was able to get around the following exception by replacing org.apache.axis2.jaxbri.CodeGenerationUtility line 125 of Axis2 1.4 RC1 as follows (in anonymous EntityResolver.resolveEntity())
> Replace this: if (key.getTargetNamespace().equals(publicId)) {
> With this: if (key.getTargetNamespace() != null && key.getTargetNamespace().equals(publicId)) {
> Additionally, I'm not sure if it would be acceptable to skip the for loop all together if publicId is null.
> The exception that I encountered was:
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
> ... 3 more
> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:307)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility$1.resolveEntity(CodeGenerationUtility.java:125)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:296)
> at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:95)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:394)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:274)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148)
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:193)
> ... 8 more
> I will attach a WSDL that exploits this issue and the WSDL2Java parameters used.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3634) NullPointerException during codegen
when using JaxB RI databinding
Posted by "Aaron Gourley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aaron Gourley updated AXIS2-3634:
---------------------------------
Attachment: parlayx.zip
WSDL exploiting JAXB RI bug.
> NullPointerException during codegen when using JaxB RI databinding
> ------------------------------------------------------------------
>
> Key: AXIS2-3634
> URL: https://issues.apache.org/jira/browse/AXIS2-3634
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.4, 1.3
> Environment: Windows XP, Java 6
> Reporter: Aaron Gourley
> Attachments: parlayx.zip
>
>
> I was able to get around the following exception by replacing org.apache.axis2.jaxbri.CodeGenerationUtility line 125 of Axis2 1.4 RC1 as follows (in anonymous EntityResolver.resolveEntity())
> Replace this: if (key.getTargetNamespace().equals(publicId)) {
> With this: if (key.getTargetNamespace() != null && key.getTargetNamespace().equals(publicId)) {
> Additionally, I'm not sure if it would be acceptable to skip the for loop all together if publicId is null.
> The exception that I encountered was:
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
> ... 3 more
> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:307)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility$1.resolveEntity(CodeGenerationUtility.java:125)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:296)
> at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:95)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:394)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:274)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148)
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:193)
> ... 8 more
> I will attach a WSDL that exploits this issue and the WSDL2Java parameters used.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3634) NullPointerException during codegen
when using JaxB RI databinding
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas resolved AXIS2-3634.
-------------------------------------
Resolution: Fixed
Fixed in svn revision 639120.
> NullPointerException during codegen when using JaxB RI databinding
> ------------------------------------------------------------------
>
> Key: AXIS2-3634
> URL: https://issues.apache.org/jira/browse/AXIS2-3634
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.4, 1.3
> Environment: Windows XP, Java 6
> Reporter: Aaron Gourley
> Attachments: parlayx.zip
>
>
> I was able to get around the following exception by replacing org.apache.axis2.jaxbri.CodeGenerationUtility line 125 of Axis2 1.4 RC1 as follows (in anonymous EntityResolver.resolveEntity())
> Replace this: if (key.getTargetNamespace().equals(publicId)) {
> With this: if (key.getTargetNamespace() != null && key.getTargetNamespace().equals(publicId)) {
> Additionally, I'm not sure if it would be acceptable to skip the for loop all together if publicId is null.
> The exception that I encountered was:
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
> ... 3 more
> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:307)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at org.apache.axis2.jaxbri.CodeGenerationUtility$1.resolveEntity(CodeGenerationUtility.java:125)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:296)
> at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:95)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:394)
> at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:274)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148)
> at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:193)
> ... 8 more
> I will attach a WSDL that exploits this issue and the WSDL2Java parameters used.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org