Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4872

(7.1.z) PicketLink DomElementToStaxWritingTestCase fails on IBM JDK

    Details

      Description

      org.picketlink.test.identity.federation.core.stax.DomElementToStaxWritingTestCase from redhat-picketlink fails on IBM JDK.

      mvn -f modules/federation test -Dtest=DomElementToStaxWritingTestCase

      ParsingException [location=null]org.picketlink.common.exceptions.ParsingException: PL00074: Parsing Error:Premature end of file.
      	at org.picketlink.common.DefaultPicketLinkLogger.parserError(DefaultPicketLinkLogger.java:490)
      	at org.picketlink.common.util.DocumentUtil.getDocument(DocumentUtil.java:167)
      	at org.picketlink.common.util.DocumentUtil.getDocument(DocumentUtil.java:144)
      	at org.picketlink.test.identity.federation.core.stax.DomElementToStaxWritingTestCase.testDOM2Stax(DomElementToStaxWritingTestCase.java:48)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      	at java.lang.reflect.Method.invoke(Method.java:507)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      Caused by: org.xml.sax.SAXParseException: Premature end of file.
      	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      	at org.picketlink.common.util.DocumentUtil.getDocument(DocumentUtil.java:163)
      	... 25 more
      

      In the test, adding StaxUtil.flush(writer); to line 46 helps.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pcraveiro Pedro Igor Silva
                  Reporter:
                  okotek Ondrej Kotek
                  Tester:
                  Ondrej Kotek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: