Tuscany
  1. Tuscany
  2. TUSCANY-4035

Application could possibly fail to start if multiple threads are loading the same schema

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Java-SCA-2.0
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      This was an issue in Tuscany 1.x and is likely an issue in the 2.x code as well. The fix in 1.x was to synchronize schema loading across all XSDModelResolvers.

      Starting multiple applications simultaneously can lead to an
      exception such as:

      org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in collection. Namespace: http://my.namespace
      at
      org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:223)
      at
      org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:202)
      at
      org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:424)
      at
      org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:347)
      at
      org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:379)
      at
      org.apache.tuscany.sca.xsd.xml.XSDModelResolver.loadOnDemand(XSDModelResolver.java:204)
      at
      org.apache.tuscany.sca.xsd.xml.XSDModelResolver.aggregate(XSDModelResolver.java:240)
      at
      org.apache.tuscany.sca.xsd.xml.XSDModelResolver.resolveModel(XSDModelResolver.java:114)

      1. TUSCANY-4035v2.patch
        9 kB
        Kaushik Mukherjee

        Activity

        Simon Laws made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s Java-SCA-2.0 [ 12315542 ]
        Resolution Fixed [ 1 ]
        Hide
        Simon Laws added a comment -

        Applied at revision: 1304516. Thanks for the patch Kaushik.

        Show
        Simon Laws added a comment - Applied at revision: 1304516. Thanks for the patch Kaushik.
        Simon Laws made changes -
        Assignee Simon Laws [ simonslaws ]
        Kaushik Mukherjee made changes -
        Attachment TUSCANY-4035v2.patch [ 12519619 ]
        Hide
        Kaushik Mukherjee added a comment -

        Updated patch on top of latest revision. Includes TUSCANY-4030.

        Show
        Kaushik Mukherjee added a comment - Updated patch on top of latest revision. Includes TUSCANY-4030 .
        Kaushik Mukherjee made changes -
        Attachment TUSCANY-4035.patch [ 12519616 ]
        Kaushik Mukherjee made changes -
        Attachment TUSCANY-4035.patch [ 12519616 ]
        Hide
        Kaushik Mukherjee added a comment -

        Grant license to ASF for inclusion in ASF works

        Show
        Kaushik Mukherjee added a comment - Grant license to ASF for inclusion in ASF works
        Kaushik Mukherjee made changes -
        Attachment TUSCANY-4035.patch [ 12519460 ]
        Hide
        Simon Laws added a comment -

        Hi Kaushik

        Can you check the flag that says you're happy that this is a patch that Apache can use?

        Show
        Simon Laws added a comment - Hi Kaushik Can you check the flag that says you're happy that this is a patch that Apache can use?
        Kaushik Mukherjee made changes -
        Field Original Value New Value
        Attachment TUSCANY-4035.patch [ 12519460 ]
        Hide
        Kaushik Mukherjee added a comment -

        Add synchronized block to loadOnDemand() method

        Show
        Kaushik Mukherjee added a comment - Add synchronized block to loadOnDemand() method
        Kaushik Mukherjee created issue -

          People

          • Assignee:
            Simon Laws
            Reporter:
            Kaushik Mukherjee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development