Problem when casting a XSDTerm to a XSDElementDeclaration !! [message #59403] |
Fri, 22 April 2005 09:43 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ediouf.genigraph.fr
Hi,
I have a problem when casting a XSDTerm to a XSDElementDeclaration,
a ClassCastException is launched and in tho doc a XSDElementDeclaration is
a SubInterface of XSDTerm ! I dont understand why it does not work ??
Here's a portion of my code :
XSDTerm term = particle.getTerm();
XSDElementDeclaration element = (XSDElementDeclaration) term;
and here is a copy of the stacktrace :
java.lang.ClassCastException
at com.ecitiz.xsd.parser.Xsdparser.processingAParticle(Xsdparse r.java:260)
at com.ecitiz.xsd.parser.Xsdparser.processingAParticle(Xsdparse r.java:255)
at com.ecitiz.xsd.parser.Xsdparser.processingAnElement(Xsdparse r.java:179)
at com.ecitiz.xsd.parser.Xsdparser.processingAParticle(Xsdparse r.java:261)
at com.ecitiz.xsd.parser.Xsdparser.processingAParticle(Xsdparse r.java:255)
at com.ecitiz.xsd.parser.Xsdparser.processingAnElement(Xsdparse r.java:179)
at
com.ecitiz.xsd.parser.Xsdparser.processingTheElementRoot(Xsd parser.java:152)
at com.ecitiz.xsd.parser.Xsdparser.analyzeSchema(Xsdparser.java :127)
at
com.ecitiz.xsd.parser.XsdparserTest.testAnalyzeSchema(Xsdpar serTest.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:186)
Thanks for your reply !!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03502 seconds