You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Brian McDonald (JIRA)" <ji...@apache.org> on 2010/04/15 21:24:50 UTC
[jira] Created: (WSCOMMONS-533) NullPointerException processing
schema
NullPointerException processing schema
--------------------------------------
Key: WSCOMMONS-533
URL: https://issues.apache.org/jira/browse/WSCOMMONS-533
Project: WS-Commons
Issue Type: Bug
Affects Versions: XmlSchema 1.4.5
Reporter: Brian McDonald
When processing a imported schema without a targetnamespace (where the import had a namespace defined) you hit this exception:
[] java.lang.RuntimeException: java.lang.NullPointerException
[] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1907)
[] at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1615)
[] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
[] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:505)
[] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processTypes(WSDLSchemaUtils.java:2142)
[] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlDefsForSchemas(WSDLSchemaUtils.java:2092)
[] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2081)
[] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2060)
[] at com.itko.lisa.ws.nx.ui.NxWSStepEditor.processNewWSDL(NxWSStepEditor.java:433)
[] at com.itko.lisa.ws.nx.ui.ConnectionInfoEditor$30.run(ConnectionInfoEditor.java:940)
[] Caused by: java.lang.NullPointerException
[] at org.apache.ws.commons.schema.SchemaBuilder$1.validate(SchemaBuilder.java:1602)
[] at org.apache.ws.commons.schema.SchemaBuilder.setNamespaceAttributes(SchemaBuilder.java:369)
[] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:134)
[] at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
[] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:491)
[] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:364)
[] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1901)
[] ... 9 more
It is caused by this line in SchemaBuilder:
if (isEmpty(uri)) {
valid = isEmpty(pSchema.syntacticalTargetNamespace);
} else {
valid = pSchema.syntacticalTargetNamespace.equals(uri); // <=====
}
Simply inverting the equals will solve the problem
valid = uri.equals(pSchema.syntacticalTargetNamespace); // <=====
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (WSCOMMONS-533) NullPointerException processing
schema
Posted by "Brian McDonald (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian McDonald updated WSCOMMONS-533:
-------------------------------------
Component/s: XmlSchema
> NullPointerException processing schema
> --------------------------------------
>
> Key: WSCOMMONS-533
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-533
> Project: WS-Commons
> Issue Type: Bug
> Components: XmlSchema
> Affects Versions: XmlSchema 1.4.5
> Reporter: Brian McDonald
>
> When processing a imported schema without a targetnamespace (where the import had a namespace defined) you hit this exception:
> [] java.lang.RuntimeException: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1907)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1615)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:505)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processTypes(WSDLSchemaUtils.java:2142)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlDefsForSchemas(WSDLSchemaUtils.java:2092)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2081)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2060)
> [] at com.itko.lisa.ws.nx.ui.NxWSStepEditor.processNewWSDL(NxWSStepEditor.java:433)
> [] at com.itko.lisa.ws.nx.ui.ConnectionInfoEditor$30.run(ConnectionInfoEditor.java:940)
> [] Caused by: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder$1.validate(SchemaBuilder.java:1602)
> [] at org.apache.ws.commons.schema.SchemaBuilder.setNamespaceAttributes(SchemaBuilder.java:369)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:134)
> [] at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:491)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:364)
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1901)
> [] ... 9 more
> It is caused by this line in SchemaBuilder:
> if (isEmpty(uri)) {
> valid = isEmpty(pSchema.syntacticalTargetNamespace);
> } else {
> valid = pSchema.syntacticalTargetNamespace.equals(uri); // <=====
> }
> Simply inverting the equals will solve the problem
> valid = uri.equals(pSchema.syntacticalTargetNamespace); // <=====
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (WSCOMMONS-533) NullPointerException processing
schema
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benson Margulies updated WSCOMMONS-533:
---------------------------------------
Fix Version/s: XmlSchema 1.4.6
> NullPointerException processing schema
> --------------------------------------
>
> Key: WSCOMMONS-533
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-533
> Project: WS-Commons
> Issue Type: Bug
> Components: XmlSchema
> Affects Versions: XmlSchema 1.4.5
> Reporter: Brian McDonald
> Fix For: XmlSchema 1.4.6
>
>
> When processing a imported schema without a targetnamespace (where the import had a namespace defined) you hit this exception:
> [] java.lang.RuntimeException: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1907)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1615)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:505)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processTypes(WSDLSchemaUtils.java:2142)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlDefsForSchemas(WSDLSchemaUtils.java:2092)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2081)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2060)
> [] at com.itko.lisa.ws.nx.ui.NxWSStepEditor.processNewWSDL(NxWSStepEditor.java:433)
> [] at com.itko.lisa.ws.nx.ui.ConnectionInfoEditor$30.run(ConnectionInfoEditor.java:940)
> [] Caused by: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder$1.validate(SchemaBuilder.java:1602)
> [] at org.apache.ws.commons.schema.SchemaBuilder.setNamespaceAttributes(SchemaBuilder.java:369)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:134)
> [] at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:491)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:364)
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1901)
> [] ... 9 more
> It is caused by this line in SchemaBuilder:
> if (isEmpty(uri)) {
> valid = isEmpty(pSchema.syntacticalTargetNamespace);
> } else {
> valid = pSchema.syntacticalTargetNamespace.equals(uri); // <=====
> }
> Simply inverting the equals will solve the problem
> valid = uri.equals(pSchema.syntacticalTargetNamespace); // <=====
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WSCOMMONS-533) NullPointerException processing
schema
Posted by "Lahiru Gunathilake (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lahiru Gunathilake resolved WSCOMMONS-533.
------------------------------------------
Resolution: Fixed
Thanks Brian for giving fixing method.
Lahiru
> NullPointerException processing schema
> --------------------------------------
>
> Key: WSCOMMONS-533
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-533
> Project: WS-Commons
> Issue Type: Bug
> Components: XmlSchema
> Affects Versions: XmlSchema 1.4.5
> Reporter: Brian McDonald
>
> When processing a imported schema without a targetnamespace (where the import had a namespace defined) you hit this exception:
> [] java.lang.RuntimeException: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1907)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1615)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:505)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processTypes(WSDLSchemaUtils.java:2142)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlDefsForSchemas(WSDLSchemaUtils.java:2092)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2081)
> [] at com.itko.lisa.ws.nx.WSDLSchemaUtils.processWsdlSchema(WSDLSchemaUtils.java:2060)
> [] at com.itko.lisa.ws.nx.ui.NxWSStepEditor.processNewWSDL(NxWSStepEditor.java:433)
> [] at com.itko.lisa.ws.nx.ui.ConnectionInfoEditor$30.run(ConnectionInfoEditor.java:940)
> [] Caused by: java.lang.NullPointerException
> [] at org.apache.ws.commons.schema.SchemaBuilder$1.validate(SchemaBuilder.java:1602)
> [] at org.apache.ws.commons.schema.SchemaBuilder.setNamespaceAttributes(SchemaBuilder.java:369)
> [] at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:134)
> [] at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:121)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:491)
> [] at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:364)
> [] at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1901)
> [] ... 9 more
> It is caused by this line in SchemaBuilder:
> if (isEmpty(uri)) {
> valid = isEmpty(pSchema.syntacticalTargetNamespace);
> } else {
> valid = pSchema.syntacticalTargetNamespace.equals(uri); // <=====
> }
> Simply inverting the equals will solve the problem
> valid = uri.equals(pSchema.syntacticalTargetNamespace); // <=====
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.