I have a complex schema most of which uses the empty namespace, except for one file, CDQobjects.xsd. The elements in there need to rely on some elements from the empty namespace and imports the appropriate file CreditCurves.xsd. However when I run xjc on the schema it fails with error:
However, if I remove all of the other schema files and leave just the one with the error and the one it relies on, without editing them:
CDQobjects.xsd
CreditCurves.xsd
Then xjc creates the java classes correctly.
I tried to whittle down the test case to a simpler schema to make it easier for you to reproduce the problem but I ran into some strange and seemingly improbable dependencies:
I got the test set down to just 3 files, and the addition the 3rd (unreferenced) xsd file would cause the error to appear. However, when I moved this schema to a different dir to package them up, I noticed that the error did not occur on the copy!
In a different test, I changed the name of CreditCurves.xsd to BeforeCDQobjectsCreditCurves.xsd and the error went away when I used xjc on Windows 7, but still occurred on our build server on Linux.
The error seems to consistently occur on Windows with the package of Schema files that I have attached. I hope you can reproduce it locally and then just delete bits until you get to a simple case that reliably fails and helps you uncover the problem.
Ah. I just started looking for the attach button to include the schema and there doesn't seem to be one! How should I send you the test case?
I have a complex schema most of which uses the empty namespace, except for one file, CDQobjects.xsd. The elements in there need to rely on some elements from the empty namespace and imports the appropriate file CreditCurves.xsd. However when I run xjc on the schema it fails with error:
However, if I remove all of the other schema files and leave just the one with the error and the one it relies on, without editing them:
Then xjc creates the java classes correctly.
I tried to whittle down the test case to a simpler schema to make it easier for you to reproduce the problem but I ran into some strange and seemingly improbable dependencies:
The error seems to consistently occur on Windows with the package of Schema files that I have attached. I hope you can reproduce it locally and then just delete bits until you get to a simple case that reliably fails and helps you uncover the problem.
Ah. I just started looking for the attach button to include the schema and there doesn't seem to be one! How should I send you the test case?
Environment
Windows 7 or Linux, Java 6u18
Affected Versions
[2.2.7]