From: Guillaume L. <gui...@gm...> - 2005-07-20 11:25:08
|
Hello ! I hit a strange problem (stack trace below). I get an XNIException when running my tests from Maven. The same tests (same code, same jars, ...) runs fine when run from Eclipse. I found some stuff on the net about JavaScript problems, and it seems related. When I deactivate JS with "client.setJavaScriptEnabled(false);" my test runs fine both in eclipse and in maven. I tried to enable logging by adding "log4j.logger.com.gargoylesoftware.htmlunit.javascript=3DDEBUG" to my log4j.properties but with no success (no log related to that error). It really bothers me that the tests run only in Eclipse. I suppose the problem comes from some Maven config I forgot, but i really cant see where. Any help appreciated ! Thanks a lot, Guillaume Stack trace : 2005-07-20 13:23:15,940 [main] ERROR ch.tecost.siems.usecase.resident.care.dma.a ssistant.DmaAssistantHttpTest - Uncatched Exception org.apache.xerces.xni.XNIException at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.j= ava:1 860) at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789= ) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.jav= a:478 ) at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.jav= a:431 ) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder= .pars e(HTMLParser.java:330) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.j= ava:2 45) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(= Defau ltPageCreator.java:115) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(Defa= ultPa geCreator.java:84) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebC= lient .java:709) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:3= 76) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:4= 15) at ch.tecost.siems.usecase.resident.care.dma.assistant.DmaAssistant= HttpT est.getPage(DmaAssistantHttpTest.java:58) at ch.tecost.siems.usecase.resident.care.dma.assistant.DmaAssistant= HttpT est.testDmaAssistant(DmaAssistantHttpTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= Acces sorImpl.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 junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run= (JUni tTestRunner.java:325) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeIn= VM(JU nitTask.java:848) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(J= UnitT ask.java:556) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(J= UnitT ask.java:532) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:1= 35) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:2= 33) at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:1= 35) at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenG= oalTa g.java:79) at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.p= erfor mAction(MavenGoalTag.java:110) at com.werken.werkz.Goal.fire(Goal.java:639) at com.werken.werkz.Goal.attain(Goal.java:575) at com.werken.werkz.Goal.attainPrecursors(Goal.java:488) at com.werken.werkz.Goal.attain(Goal.java:573) at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.= java: 671) at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263) at org.apache.maven.cli.App.doMain(App.java:488) at org.apache.maven.cli.App.main(App.java:1239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= Acces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.werken.forehead.Forehead.run(Forehead.java:551) at com.werken.forehead.Forehead.main(Forehead.java:581) |