Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Java-SDO-1.1
-
None
-
Windows 2003 / XP / 2008. Linux
Description
Our application creates a SDO HelperContext, obtain XSDHelper instance and define XSDs using the XSDHelper instance from multiple threads. The below stated IllegalArgumentException happens when one of the XSDs is loaded from a different thread than the thread that obtained the HelperContext / XSDHelper instance.
java.lang.IllegalArgumentException at org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:263) at org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:224) at
At the point where the IllegalArgumentException is thrown, a NullPointerException (also given in the trace below) is logged into the SystemOut.
java.lang.NullPointerException
at org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.createFeature(BaseSDOXSDEcoreBuilder.java:1315)
at org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.createFeature(SDOXSDEcoreBuilder.java:374)
at org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.createFeature(BaseSDOXSDEcoreBuilder.java:1395)
at org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.computeEClass(BaseSDOXSDEcoreBuilder.java:668)
at org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.computeEClass(SDOXSDEcoreBuilder.java:325)
at org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.computeEClassifier(BaseSDOXSDEcoreBuilder.java:159)
at org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.computeEClassifier(SDOXSDEcoreBuilder.java:341)
at org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcoreBuilder.java:212)
at org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.getEClassifier(SDOXSDEcoreBuilder.java:150)
at org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.generate(BaseSDOXSDEcoreBuilder.java:1533)
at org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:246)
at org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:224)
Do you know what might be causing this issue for us? It is also observed that when the schemas are loaded from a single thread, the issue doesn't appear.
Our tests also indicate that the above exceptions appear only when there is a primitive type in the XSDs that are being defined (viz., xsd:int, xsd:float etc). When no such primitive type exists, though the types are loaded from multiple threads, no exceptions from SDO are reported.
Could you let us know if this is already fixed (or) when a fix for this could be made available.
Thanks for your help.
Regards, Srinivasan