Srinivasan Nanduri created TUSCANY-4042:
-------------------------------------------
Summary: java.lang.IllegalArgumentException when defining Schemas
in a multithreaded environment
Key: TUSCANY-4042
URL: https://issues.apache.org/jira/browse/TUSCANY-4042
Project: Tuscany
Issue Type: Bug
Components: Java SDO Implementation
Affects Versions: Java-SDO-1.1
Environment: Windows 2003 / XP / 2008. Linux
Reporter: Srinivasan Nanduri
Fix For: Java-SDO-1.1
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira