10 Replies Latest reply on Sep 19, 2005 7:28 AM by aloubyansky

    Broken JBossXB tests

      Some of the JBossXB tests are broken in head.

      I don't see anything in JIRA or here that shows this is a known issue?

      e.g. the misc/sandbox test is broken because it is not applying the type
      defined in the xsd. (tried with xni parser and still broken).

       <xsd:element name="choiceCollection1" type="sb:choice1" maxOccurs="3"/>
      
       <xsd:complexType name="choice1">
       <xsd:choice>
       <xsd:element name="a" type="xsd:string"/>
       <xsd:element name="b" type="xsd:string"/>
       </xsd:choice>
       </xsd:complexType>
      


      choice1 does not get used. Instead it just adds the strings directly into the collection.


        • 1. Re: Broken JBossXB tests
          aloubyansky

          There should be 2 failing tests.

          The first one is

           <testcase classname="org.jboss.test.xml.MiscUnitTestCase" name="testSandboxXml" time="0.29">
           <failure message="expected:&lt;[choiceCollection1=[[a=choice1_a, b=null], [a=null, b=choice1_b]], choice2=[[c=choice2_c, d=choice2_d, e=null], [c=null, d=choice2_d, e=choice2_e]], choice3=[[listOfIntegers=[1, 2, 3], listOfStrigns=null], [listOfIntegers=null, listOfStrigns=[1, 2, 3]]]]&gt; but was:&lt;[choiceCollection1=[choice1_a, choice1_b], choice2=[[c=choice2_c, d=choice2_d, e=null], [c=null, d=choice2_d, e=choice2_e]], choice3=[[listOfIntegers=[1, 2, 3], listOfStrigns=null], [listOfIntegers=null, listOfStrigns=[1, 2, 3]]]]&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expected:<[choiceCollection1=[[a=choice1_a, b=null], [a=null, b=choice1_b]], choice2=[[c=choice2_c, d=choice2_d, e=null], [c=null, d=choice2_d, e=choice2_e]], choice3=[[listOfIntegers=[1, 2, 3], listOfStrigns=null], [listOfIntegers=null, listOfStrigns=[1, 2, 3]]]]> but was:<[choiceCollection1=[choice1_a, choice1_b], choice2=[[c=choice2_c, d=choice2_d, e=null], [c=null, d=choice2_d, e=choice2_e]], choice3=[[listOfIntegers=[1, 2, 3], listOfStrigns=null], [listOfIntegers=null, listOfStrigns=[1, 2, 3]]]]>
           at org.jboss.test.xml.MiscUnitTestCase.assertUnmarshalled(MiscUnitTestCase.java:752)
           at org.jboss.test.xml.MiscUnitTestCase.testSandboxXml(MiscUnitTestCase.java:471)
          


          It started to fail after switching from XNI-based parser (and xerces validator extension) to standard SAX. As a consequence, XSD type info is not availble and this test fails. This was discussed before switching to pure SAX.
          This test is for MappingObjectModelFactory only, if you are using sunday package, you are safe.

          The second failure is
           <testcase classname="org.jboss.test.xml.ValueListUnitTestCase" name="testNonReqAttrAndElemWithEqualQName" time="0.06">
           <failure message="This is a known issue expected:&lt;nonReqElemQName&gt; but was:&lt;nonReqAttrQName&gt;" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: This is a known issue expected:<nonReqElemQName> but was:<nonReqAttrQName>
           at org.jboss.test.xml.ValueListUnitTestCase.testNonReqAttrAndElemWithEqualQName(ValueListUnitTestCase.java:39)
          


          • 2. Re: Broken JBossXB tests

            I have a more serious issue.

            All of the parsing of repeated elements is broken in the microcontainer
            e.g.

            <array>
             <value>x</value>
             <value>y</value> <!-- This fails -->
            </array>
            


            I was trying to understand how this works (I didn't entirely succeed so this is a guess :-),
            It looks to be due to the choice cursor (or one of the other cursors?)
            not getting reset or maybe the stack is corrupted?

            To reproduce in jboss-head
            cd kernel
            ant -f build-test.xml tests


            • 3. Re: Broken JBossXB tests

              More information with some extra logging added to the bindings and cursors - not very formatted sorry :-(

              2506 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] startElement: startName={urn:jboss:bean-deployer}array
              2507 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}array i=-1 ChoiceBindingCu
              rsor@22310332{pos=-1 occurs=0 choices=[ChoiceBinding28991606{choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementB
              inding@19509473{qname={urn:jboss:bean-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@5343
              53{qname={urn:jboss:bean-deployer}set}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jb
              oss:bean-deployer}map}, ElementBinding@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deploye
              r}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@1202d69]}]}
              2508 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}array i=-1 ChoiceBindingCu
              rsor@32542424{pos=-1 occurs=0 choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementBinding@19509473{qname={urn:jbos
              s:bean-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@534353{qname={urn:jboss:bean-deploy
              er}set}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jboss:bean-deployer}map}, Element
              Binding@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.s
              unday.unmarshalling.WildcardBinding@1202d69]}
              2508 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[ChoiceBindingCursor@32542424{pos=4 element=ElementBinding@2
              1846985{qname={urn:jboss:bean-deployer}array} occurs=1 choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementBinding
              @19509473{qname={urn:jboss:bean-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@534353{qna
              me={urn:jboss:bean-deployer}set}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jboss:be
              an-deployer}map}, ElementBinding@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deployer}null
              }, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@1202d69]}]
              2509 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[ChoiceBindingCursor@32542424{pos=4 element=ElementBinding@2
              1846985{qname={urn:jboss:bean-deployer}array} occurs=1 choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementBinding
              @19509473{qname={urn:jboss:bean-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@534353{qna
              me={urn:jboss:bean-deployer}set}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jboss:be
              an-deployer}map}, ElementBinding@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deployer}null
              }, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@1202d69]}, ChoiceBindingCursor@22310332{pos=0 occurs=1 choices=[ChoiceBinding28
              991606{choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementBinding@19509473{qname={urn:jboss:bean-deployer}collect
              ion}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@534353{qname={urn:jboss:bean-deployer}set}, ElementBinding
              @21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jboss:bean-deployer}map}, ElementBinding@11024915{qname=
              {urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday.unmarshalling.Wil
              dcardBinding@1202d69]}]}]
              2509 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor SequenceBindingCursor@14452459{pos=0 occurs=1}
              2510 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor SequenceBindingCursor@1947116{pos=0 occurs=1}
              2510 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor SequenceBindingCursor@9613729{pos=0 occurs=1}
              2510 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor SequenceBindingCursor@13367741{pos=1 occurs=1}
              2510 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor SequenceBindingCursor@24713456{pos=0 occurs=1}
              2510 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor ChoiceBindingCursor@22310332{pos=0 occurs=1 choice
              s=[ChoiceBinding28991606{choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, ElementBinding@19509473{qname={urn:jboss:bea
              n-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@534353{qname={urn:jboss:bean-deployer}se
              t}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn:jboss:bean-deployer}map}, ElementBindi
              ng@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday
              .unmarshalling.WildcardBinding@1202d69]}]}
              2520 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor ChoiceBindingCursor@32542424{pos=4 element=Element
              Binding@21846985{qname={urn:jboss:bean-deployer}array} occurs=1 choices=[ElementBinding@3874616{qname={urn:jboss:bean-deployer}value}, Eleme
              ntBinding@19509473{qname={urn:jboss:bean-deployer}collection}, ElementBinding@1812813{qname={urn:jboss:bean-deployer}list}, ElementBinding@5
              34353{qname={urn:jboss:bean-deployer}set}, ElementBinding@21846985{qname={urn:jboss:bean-deployer}array}, ElementBinding@29683960{qname={urn
              :jboss:bean-deployer}map}, ElementBinding@11024915{qname={urn:jboss:bean-deployer}inject}, ElementBinding@8180602{qname={urn:jboss:bean-depl
              oyer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@1202d69]}
              2520 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed binding {urn:jboss:bean-deployer}array=ElementBinding@218
              46985{qname={urn:jboss:bean-deployer}array}
              2525 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] startElement: startName={urn:jboss:bean-deployer}value
              2526 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}value i=-1 ChoiceBindingCu
              rsor@27646795{pos=-1 occurs=0 choices=[ChoiceBinding10486149{choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, Element
              Binding@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24
              745276{qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn
              :jboss:bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-dep
              loyer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}]}
              2527 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}value i=-1 ChoiceBindingCu
              rsor@31478058{pos=-1 occurs=0 choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jbo
              ss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-de
              ployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, Elem
              entBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.bindi
              ng.sunday.unmarshalling.WildcardBinding@13936e1]}
              2527 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[ChoiceBindingCursor@31478058{pos=0 element=ElementBinding@1
              2829461{qname={urn:jboss:bean-deployer}value} occurs=1 choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBindin
              g@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276
              {qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss
              :bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}
              null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}]
              2528 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[ChoiceBindingCursor@31478058{pos=0 element=ElementBinding@1
              2829461{qname={urn:jboss:bean-deployer}value} occurs=1 choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBindin
              g@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276
              {qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss
              :bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}
              null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}, ChoiceBindingCursor@27646795{pos=0 occurs=1 choices=[ChoiceBindi
              ng10486149{choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jboss:bean-deployer}co
              llection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-deployer}set}, Elemen
              tBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, ElementBinding@14910620
              {qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday.unmarshal
              ling.WildcardBinding@13936e1]}]}]
              2529 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor ChoiceBindingCursor@27646795{pos=0 occurs=1 choice
              s=[ChoiceBinding10486149{choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jboss:be
              an-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-deploye
              r}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, ElementBi
              nding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.su
              nday.unmarshalling.WildcardBinding@13936e1]}]}
              2529 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed cursor ChoiceBindingCursor@31478058{pos=0 element=Element
              Binding@12829461{qname={urn:jboss:bean-deployer}value} occurs=1 choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, Elem
              entBinding@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding
              @24745276{qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={
              urn:jboss:bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-
              deployer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}
              2529 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed binding {urn:jboss:bean-deployer}value=ElementBinding@128
              29461{qname={urn:jboss:bean-deployer}value}
              2543 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] poped {urn:jboss:bean-deployer}value=ElementBinding@12829461{qna
              me={urn:jboss:bean-deployer}value}
              2570 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] startElement: startName={urn:jboss:bean-deployer}value
              2571 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}value i=0 ChoiceBindingCur
              sor@31478058{pos=0 element=ElementBinding@12829461{qname={urn:jboss:bean-deployer}value} occurs=1 choices=[ElementBinding@12829461{qname={ur
              n:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:b
              ean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}arra
              y}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBindi
              ng@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}
              2572 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[]
              2573 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] poped ChoiceBindingCursor@31478058{pos=0 occurs=1 choices=[Eleme
              ntBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding
              @26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={
              urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-de
              ployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@1393
              6e1]}
              2574 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] startElement: qName={urn:jboss:bean-deployer}value i=0 ChoiceBindingCur
              sor@27646795{pos=0 occurs=1 choices=[ChoiceBinding10486149{choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBi
              nding@18945918{qname={urn:jboss:bean-deployer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@2474
              5276{qname={urn:jboss:bean-deployer}set}, ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:j
              boss:bean-deployer}map}, ElementBinding@14910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deplo
              yer}null}, org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding@13936e1]}]}
              2574 TRACE [org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding] groupStack=[]
              2574 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] poped ChoiceBindingCursor@27646795{pos=0 occurs=1 choices=[Choic
              eBinding10486149{choices=[ElementBinding@12829461{qname={urn:jboss:bean-deployer}value}, ElementBinding@18945918{qname={urn:jboss:bean-deplo
              yer}collection}, ElementBinding@26049230{qname={urn:jboss:bean-deployer}list}, ElementBinding@24745276{qname={urn:jboss:bean-deployer}set},
              ElementBinding@20237898{qname={urn:jboss:bean-deployer}array}, ElementBinding@8310136{qname={urn:jboss:bean-deployer}map}, ElementBinding@14
              910620{qname={urn:jboss:bean-deployer}inject}, ElementBinding@18306724{qname={urn:jboss:bean-deployer}null}, org.jboss.xb.binding.sunday.unm
              arshalling.WildcardBinding@13936e1]}]}
              2575 WARN [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] Element not found: {urn:jboss:bean-deployer}value
              2575 TRACE [org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler] pushed binding {urn:jboss:bean-deployer}value=null
              2578 ERROR [org.jboss.test.kernel.config.test.ArrayXMLTestCase] Unexpected throwable
              org.jboss.xb.binding.JBossXBException: Failed to parse source: Element {urn:jboss:bean-deployer}value is not bound as a global element.
               at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:125)
               at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:105)
               at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:63)
               at org.jboss.test.kernel.config.support.XMLUtil.<init>(XMLUtil.java:61)
               at org.jboss.test.kernel.config.test.AbstractKernelConfigTest.bootstrapXML(AbstractKernelConfigTest.java:54)
               at org.jboss.test.kernel.config.test.ArrayXMLTestCase.arrayNotAArray(ArrayXMLTestCase.java:59)
               at org.jboss.test.kernel.config.test.ArrayTestCase.testArrayNotAArray(ArrayTestCase.java:238)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at junit.framework.TestCase.runTest(TestCase.java:154)
               at junit.framework.TestCase.runBare(TestCase.java:127)
               at junit.framework.TestResult$1.protect(TestResult.java:106)
               at junit.framework.TestResult.runProtected(TestResult.java:124)
               at junit.framework.TestResult.run(TestResult.java:109)
               at junit.framework.TestCase.run(TestCase.java:118)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
              Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element {urn:jboss:bean-deployer}value is not bound as a global element.
               at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:433)
               at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:217)
               at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
               at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
               at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
               at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
               at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
               at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
               at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
               at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
               at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
               at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
               at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:121)
               ... 19 more
              2583 DEBUG [org.jboss.test.kernel.config.test.ArrayXMLTestCase] ==== Stopping testArrayNotAArray ====
              


              <?xml version="1.0" encoding="UTF-8"?>
              
              <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
               xmlns="urn:jboss:bean-deployer">
               <bean name="SimpleBean" class="org.jboss.test.kernel.config.support.SimpleBean">
               <property name="aString">
               <array elementClass="java.lang.String">
               <value>string1</value>
               <value>string2</value> <!-- !!!! Breaks while parsing this !!!! -->
               <value>string2</value>
               <value>string1</value>
               </array>
               </property>
               </bean>
              </deployment>
              



              • 4. Re: Broken JBossXB tests

                Unfortunately the microcontainer regression tests aren't in place yet...
                http://jira.jboss.com/jira/browse/JBQA-143

                • 5. Re: Broken JBossXB tests
                  aloubyansky

                  Sorry. I will look into this.

                  • 6. Re: Broken JBossXB tests
                    • 7. Re: Broken JBossXB tests
                      aloubyansky

                      Should be fixed now. All your tests pass now.

                      • 8. Re: Broken JBossXB tests
                        aloubyansky

                        There is an issue with minOccurs on model groups that should still be investigated.
                        E.g. there could be a sequence with no minOccurs defined, which means its minOccurs defaulted to 1. The sequence contains only elements with minOccurs=0. If in XML content, the sequence is allowed to appear at a certain position but no elements from the sequence found starting from that position then JBossXBRuntimeException will be thrown. To workaround this issue, minOccurs on the sequence should be set to 0.
                        It seems like setting minOccurs to 0 should not be required though. I will work on this.

                        • 9. Re: Broken JBossXB tests

                          Thanks Alex.

                          I'm in Switzerland next week, so I'll buy you a beer for this.

                          • 10. Re: Broken JBossXB tests
                            aloubyansky

                            And I'll buy you one for breaking your tests ;)

                            The minOccurs issue has also been fixed.