Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-425

Wrong class loaded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Works for Me
    • Version 2.4
    • Version 5.1.0
    • None
    • None

    Description

      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

      Attachments

        1. xmlSchema.jar
          375 kB
          Matej Perse
        2. xmlbeans-425.zip
          170 kB
          Andreas Beeker
        3. posebniVpliviSchema.jar
          37 kB
          Matej Perse
        4. posebni_vplivi_2009-11-24.xsdconfig
          0.2 kB
          Matej Perse
        5. posebni_vplivi_2009-11-24.xsd
          1 kB
          Matej Perse
        6. model_2009-11-24.xsdconfig
          0.2 kB
          Matej Perse
        7. model_2009-11-24.xsd
          13 kB
          Matej Perse

        Activity

          People

            kiwiwings Andreas Beeker
            maperse Matej Perse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: