Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: descriptor
    • Labels:
      None

      Description

      The JaxBDescriptorServiceImplTest unit test fails, giving the message:
      unexpected element (uri:"http://java.sun
      .com/xml/ns/portlet/portlet-app_2_0.xsd", local:"description"). Expected elements are <

      {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

      transportGuarantee>,<

      {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

      descriptions>
      Location: line 76

      It should be noted that this test runs fine in the 1.1-286-COMPATIBILITY branch.

        Activity

        Hide
        Craig Doremus added a comment -

        The full stack trace of the test failure in maven 2 is as follows. As seen in the stack trace, the point at which it fails in the Pluto code is PortletAppDescriptorServiceImpl.java line 40.

        Full stack trace:

        unexpected element (uri:"http://java.sun
        .com/xml/ns/portlet/portlet-app_2_0.xsd", local:"description"). Expected element
        s are <

        {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

        transportGuarante
        e>,<

        {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

        descriptions>
        Location: line 76
        javax.xml.bind.UnmarshalException: unexpected element (uri:"http://java.sun.com/
        xml/ns/portlet/portlet-app_2_0.xsd", local:"description"). Expected elements are
        <

        {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

        transportGuarantee>,<

        { http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}

        descriptions>
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE
        vent(UnmarshallingContext.java:556)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
        va:199)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja
        va:194)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild
        Element(Loader.java:71)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.j
        ava:65)
        at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement
        (StructureLoader.java:209)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE
        lement(UnmarshallingContext.java:399)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl
        ement(UnmarshallingContext.java:380)
        at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle
        ment(InterningXmlVisitor.java:35)
        at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SA
        XConnector.java:101)
        at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)

        at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
        Validator.java:1197)
        at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
        tScanner.java:1862)
        at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
        atch(XMLDocumentScanner.java:1238)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
        canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
        UnmarshallerImpl.java:195)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U
        nmarshallerImpl.java:168)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
        arshallerImpl.java:137)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm
        arshallerImpl.java:184)
        at org.apache.pluto.descriptors.services.jaxb.PortletAppDescriptorServic
        eImpl.read(PortletAppDescriptorServiceImpl.java:40)
        at org.apache.pluto.descriptors.services.jaxb.JaxBDescriptorServiceImplT
        est.testRead(JaxBDescriptorServiceImplTest.java:277)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
        java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.
        java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
        java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
        tSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
        stractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
        java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
        refireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
        ava:818)

        Show
        Craig Doremus added a comment - The full stack trace of the test failure in maven 2 is as follows. As seen in the stack trace, the point at which it fails in the Pluto code is PortletAppDescriptorServiceImpl.java line 40. Full stack trace: unexpected element (uri:"http://java.sun .com/xml/ns/portlet/portlet-app_2_0.xsd", local:"description"). Expected element s are < {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd} transportGuarante e>,< {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd} descriptions> Location: line 76 javax.xml.bind.UnmarshalException: unexpected element (uri:"http://java.sun.com/ xml/ns/portlet/portlet-app_2_0.xsd", local:"description"). Expected elements are < {http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd} transportGuarantee>,< { http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd} descriptions> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleE vent(UnmarshallingContext.java:556) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja va:199) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.ja va:194) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChild Element(Loader.java:71) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.j ava:65) at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement (StructureLoader.java:209) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startE lement(UnmarshallingContext.java:399) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEl ement(UnmarshallingContext.java:380) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startEle ment(InterningXmlVisitor.java:35) at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SA XConnector.java:101) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML Validator.java:1197) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen tScanner.java:1862) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp atch(XMLDocumentScanner.java:1238) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS canner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0( UnmarshallerImpl.java:195) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(U nmarshallerImpl.java:168) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm arshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnm arshallerImpl.java:184) at org.apache.pluto.descriptors.services.jaxb.PortletAppDescriptorServic eImpl.read(PortletAppDescriptorServiceImpl.java:40) at org.apache.pluto.descriptors.services.jaxb.JaxBDescriptorServiceImplT est.testRead(JaxBDescriptorServiceImplTest.java:277) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:228) at junit.framework.TestSuite.run(TestSuite.java:223) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner. java:35) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su refireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j ava:818)
        Hide
        Christian Raschka added a comment -

        I don't know, if it is the problem, but i think the UserDataConstraintDD class is missing.

        Show
        Christian Raschka added a comment - I don't know, if it is the problem, but i think the UserDataConstraintDD class is missing.
        Hide
        Craig Doremus added a comment -

        Thanks, Christian, for looking into this. The UserDataConstraintDD was moved in the SVN trunk into the common package, so that is what I did in the 1.1-286-trunk-merge branch. Also copied over from trunk was the DescriptionDD to the common package. Based on these two facts, My best guess so far is that the UserDataConstraintDD and DescriptionDD needs JAXB annotations. Is this something you could help me out with?

        Show
        Craig Doremus added a comment - Thanks, Christian, for looking into this. The UserDataConstraintDD was moved in the SVN trunk into the common package, so that is what I did in the 1.1-286-trunk-merge branch. Also copied over from trunk was the DescriptionDD to the common package. Based on these two facts, My best guess so far is that the UserDataConstraintDD and DescriptionDD needs JAXB annotations. Is this something you could help me out with?
        Hide
        Christian Raschka added a comment -

        That's it. The JAXB annotations are lost. I'll getting into this ASAP.

        Show
        Christian Raschka added a comment - That's it. The JAXB annotations are lost. I'll getting into this ASAP.
        Hide
        Christian Raschka added a comment -

        Here are the right annotations for the UserDataConstraintDD class.

        I've also made some small other changes:

        • changed junit version to 4.0 (with 3.8.2 i had compile errors)
        • changed jsp-api version to 2.0 (see spec)

        changed imports (use jaxb instead of castor):

        • pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/EarAssemblerTest.java
        • pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java
        • pluto-util/src/test/java/org/apache/pluto/util/assemble/io/AssemblyStreamTest.java
        • pluto-util/src/main/java/org/apache/pluto/util/assemble/io/WebXmlStreamingAssembly.java

        Two tests still fail. I have to look deeper into this.

        Show
        Christian Raschka added a comment - Here are the right annotations for the UserDataConstraintDD class. I've also made some small other changes: changed junit version to 4.0 (with 3.8.2 i had compile errors) changed jsp-api version to 2.0 (see spec) changed imports (use jaxb instead of castor): pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/EarAssemblerTest.java pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java pluto-util/src/test/java/org/apache/pluto/util/assemble/io/AssemblyStreamTest.java pluto-util/src/main/java/org/apache/pluto/util/assemble/io/WebXmlStreamingAssembly.java Two tests still fail. I have to look deeper into this.
        Hide
        Craig Doremus added a comment -

        Applied userdataconstraintdd.new.190807.patch in SVN revision 567693. Thank you Christian!

        Show
        Craig Doremus added a comment - Applied userdataconstraintdd.new.190807.patch in SVN revision 567693. Thank you Christian!

          People

          • Assignee:
            Unassigned
            Reporter:
            Craig Doremus
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development