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

XMLBeans compiler plugin not stateless between subsequent build steps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Version 5.1.0
    • None
    • Compiler
    • None

    Description

      I have a multi-module maven build generating and compiling XMLBeans bindings for multiple XML schemas (using the compile goal).

      When I execute just a single build out of them, the result is correct and executable.

      But when executing them subsequent in the same maven build (and thus the same Java VM session), the subsequent builds are affected by the first one and the schema bindings (xsb files) are written to the wrong package - leading to a LinkageError reported at runtime.

      Output of the first JAR (compiling ebics_hev.xsd from here):

      Package org/ebics/h000 contains the sub packages attributegroup,, element, ... system, type

      Output of the second JAR (compiling H005 schemas from the same source):

      Package org/ebics/h005 contains interfaces and an impl sub package.

      There is another package org/ebics/h000 containing the attributegroup, element, ... system, type

       

      At runtime this leads to:

      Caused by: java.lang.LinkageError: Loading of resource {urn:org:ebics:H005}ebicsKeyManagementResponse.ebicskeymanagementresponse2269doctypefailed, information from {urn:org:ebics:H005}ebicsKeyManagementResponse.index.xsb is  out of sync (or conflicting index files found)
          at org.apache.xmlbeans.impl.schema.XsbReader.checkContainerNotNull(XsbReader.java:654)
          at org.apache.xmlbeans.impl.schema.XsbReader.finishLoadingType(XsbReader.java:1038)
          at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.resolveHandle(SchemaTypeSystemImpl.java:938)
          at org.apache.xmlbeans.impl.schema.ElementFactory.<init>(ElementFactory.java:29)
          at org.apache.xmlbeans.impl.schema.AbstractDocumentFactory.<init>(AbstractDocumentFactory.java:33)
          at org.apache.xmlbeans.impl.schema.DocumentFactory.<init>(DocumentFactory.java:23)
          at org.ebics.h004.EbicsKeyManagementResponseDocument.<clinit>(EbicsKeyManagementResponseDocument.java:23)

       

      Since this happens only when building these schemas in the same maven build, the reason must be some state in the XMLBeans plugin.

       

      Attachments

        1. mv-ibs-ebics-types-h000-1.0.jar
          41 kB
          Johannes
        2. mv-ibs-ebics-types-h005-3.0.1.jar
          1.23 MB
          Johannes
        3. pom.xml
          3 kB
          Johannes
        4. pom-1.xml
          1 kB
          Johannes
        5. pom-2.xml
          1 kB
          Johannes
        6. pom-3.xml
          0.7 kB
          Johannes

        Activity

          People

            Unassigned Unassigned
            Kaufhold Johannes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: