[
https://issues.apache.org/jira/browse/XMLBEANS-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467704#comment-17467704
]
Andreas Beeker commented on XMLBEANS-425:
-----------------------------------------
I've created sample xmls and a test class. If the schemas are generated
seperately with different xmlbeans schema aliases, it works.
The reason might be a change in the SchemaTypeLoader a while ago.
[^xmlbeans-425.zip]
> Wrong class loaded
> ------------------
>
> Key: XMLBEANS-425
> URL: https://issues.apache.org/jira/browse/XMLBEANS-425
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions: Version 2.4
> Reporter: Matej Perse
> Priority: Major
> Attachments: model_2009-11-24.xsd, model_2009-11-24.xsdconfig,
> posebniVpliviSchema.jar, posebni_vplivi_2009-11-24.xsd,
> posebni_vplivi_2009-11-24.xsdconfig, xmlSchema.jar, xmlbeans-425.zip
>
>
> Hi,
> We get an rather unusual exception. We building two separate packages
> (posebniVpliviSchema and xmlSchema) from two different schemas. In both
> packegies we have the same class name (PosebniVpliviDocumentImpl.class).
> When we include both packages into the same project, we obtain the following
> error:
> com.sinergise.pvn.xmlSchema.impl.PosebniVpliviDocumentImpl
> java.lang.ClassCastException:
> com.sinergise.pvn.xmlSchema.impl.PosebniVpliviDocumentImpl
> at
> com.sinergise.pvn.posebniVpliviSchema.PosebniVpliviDocument$Factory.parse(PosebniVpliviDocument.java:59)
> at
> com.sinergise.pvn.server.utils.XMLImporter.savePosebniVplivi(XMLImporter.java:280)
> at com.sinergise.pvn.server.main.PVNImporter.main(PVNImporter.java:60)
> As you can see from the error, we parse the xml document using the
> "posebniVpliviSchema" package but in the parsing process the XMLBeans try to
> use the class from the "xmlSchema" package.
> It looks like the package information is completely ignored since when we
> invert the order of the linked project the above error is resolved, but then
> we get the error in the other project.
> Regards,
> Matej
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]