[ 
https://issues.apache.org/jira/browse/TUSCANY-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502577
 ] 

Chris Mildebrandt commented on TUSCANY-1333:
--------------------------------------------

I just tested it, it works. Thanks for the quick fix.

> [Java SDO] ClassCastException when defining schema file without .xsd extension
> ------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1333
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1333
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>         Environment: IBM JDK 1.4.2
>            Reporter: Chris Mildebrandt
>
> With the following code:
> HelperContext context = SDOUtil.createHelperContext();
> context.getXSDHelper().define(new FileInputStream("./Person.xsd.tmp"), (new 
> File("./Person.xsd.tmp")).toURI().toString());
> I get the following exception:
> java.lang.ClassCastException: 
> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl
>       at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:245)
>       at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:236)
>       at Test.doubleContextTest(Test.java:193)
>       at Test.main(Test.java:214)
> Exception in thread "main" java.lang.IllegalArgumentException: 
> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl
>       at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:278)
>       at 
> org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:236)
>       at Test.doubleContextTest(Test.java:193)
>       at Test.main(Test.java:214)
> If I remove the .tmp from the schema file name, the exception goes away. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to