openjax/xml

Null pointer exception when validating XML with no targetNamespace defined in XSD

Closed this issue · 3 comments

Hi @safris,

First of all, I love your work on this!

One question though: I'm running into a null pointer exception when validating an XML with a global namespace. Have you ever run into this and how should I proceed?

This is the line that the error is pointing to:

if (preview.getTargetNamespace().length() > 0) {

Please let me know if you need any other information!

Fleshing out this issue... looks like this is actually an error when validating the xsd. When there is no targetNamespace specified in the schema, I get a null pointer exception.

Hi @nsuitter, thanks for the message. Can you provide an example XSD to reproduce this problem?

Hi @nsuitter, I have checked in a commit that should fix the issue you experienced. A new build of org.openjax:xml:0.9.5-SNAPSHOT has been deployed to the Sonatype snapshot repo. I will close this issue, but please reopen if you continue to experience it.