Closed hohwille closed 11 years ago
Problem does not ocurre with JDK 6 (jdk1.6.0_45) or JDK 7 (jdk1.7.0_25). IMHO this used to work with older versions of Java5.
Caused by: javax.xml.stream.XMLStreamException: Precondition for readText is nextEvent().getTypeEventType() == START_ELEMENT (got 4) at com.bea.xml.stream.XMLEventReaderBase.getElementText(XMLEventReaderBase.java:87)
This (com.bea) might indicate that there was some merge with JRockit into Tiger(java5) during maintenance release. Support on Java5 has reached EOL in October 2009, latest 1.5 release was u45. I should try to get this and run the tests again. If it is working then, we are done. Otherwise this remains a 1.5 bug and we will set to wontfix as there is nothing we can do about it.
jdk1.5.0_22 is the latest tiger release that I can get for free. Hence there is nothing left that I can do about this problem.
I just noticed that this problem only occurs when the tests are executed via surefire in maven. There is no such problem if I invoke the test manually or via Eclipse. So it seems that maven is not properly shading the classpath during surefire testing and maven itself may have a different StAX implementation that behaves uncommon. For our project I consider this as not a bug (invalid).
We found a regression bug with JDK 1.5.0_22: Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.691 sec <<< FAILURE! testHelp(net.sf.mmm.util.cli.api.AbstractVersionedMainTest) Time elapsed: 0.649 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<[]> but was:<[An unexpected error has occurred: net.sf.mmm.util.xml.base.XmlInvalidException: TODO(de):The XML from "ClasspathResource[net/sf/mmm/util/text/hyphenation_de.xml]" is invalid! 1450a069-5ab5-4ee0-af92-f689aba1b7ca at net.sf.mmm.util.text.base.HyphenatorBuilderImpl.createHyphenator(HyphenatorBuilderImpl.java:219) at net.sf.mmm.util.text.base.HyphenatorBuilderImpl.createHyphenator(HyphenatorBuilderImpl.java:137) at net.sf.mmm.util.text.base.AbstractHyphenatorBuilder.getHyphenator(AbstractHyphenatorBuilder.java:77) at net.sf.mmm.util.text.base.DefaultLineWrapper$ColumnState.(DefaultLineWrapper.java:775)
at net.sf.mmm.util.text.base.DefaultLineWrapper.wrap(DefaultLineWrapper.java:245)
at net.sf.mmm.util.text.base.AbstractLineWrapper.wrap(AbstractLineWrapper.java:32)
at net.sf.mmm.util.cli.base.AbstractCliParser$CliHelpWriter.printText(AbstractCliParser.java:844)
at net.sf.mmm.util.cli.base.AbstractCliParser.printHelp(AbstractCliParser.java:370)
at net.sf.mmm.util.cli.api.AbstractMain.printHelp(AbstractMain.java:238)
at net.sf.mmm.util.cli.api.AbstractMain.run(AbstractMain.java:266)
at net.sf.mmm.util.cli.api.AbstractVersionedMainTest.testHelp(AbstractVersionedMainTest.java:30)
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:592)
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.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
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:592)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: javax.xml.stream.XMLStreamException: Precondition for readText is nextEvent().getTypeEventType() == START_ELEMENT (got 4)
at com.bea.xml.stream.XMLEventReaderBase.getElementText(XMLEventReaderBase.java:87)
at net.sf.mmm.util.text.base.HyphenatorBuilderImpl.parseStringList(HyphenatorBuilderImpl.java:250)
at net.sf.mmm.util.text.base.HyphenatorBuilderImpl.createHyphenator(HyphenatorBuilderImpl.java:195)
... 39 more
]>
at org.junit.Assert.assertEquals(Assert.java:125)
at org.junit.Assert.assertEquals(Assert.java:147)
...