From: Marc G. <mgu...@ya...> - 2005-07-20 12:38:53
|
Salut Guillaume, never seen that before (I use Eclipse all the time). Is it the full stack trace? Can you produce a minimal test illustrating the problem? Marc. Guillaume Lederrey wrote: > 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=DEBUG" 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.java:1 > 860) > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:789) > at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478 > ) > at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java: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.java:2 > 45) > at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(Defau > ltPageCreator.java:115) > at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPa > geCreator.java:84) > at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient > .java:709) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376) > at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:415) > at ch.tecost.siems.usecase.resident.care.dma.assistant.DmaAssistantHttpT > est.getPage(DmaAssistantHttpTest.java:58) > at ch.tecost.siems.usecase.resident.care.dma.assistant.DmaAssistantHttpT > est.testDmaAssistant(DmaAssistantHttpTest.java:50) > 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: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.executeInVM(JU > nitTask.java:848) > at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT > ask.java:556) > at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT > 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:135) > at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) > 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:135) > at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa > g.java:79) > at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor > 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(NativeMethodAccessorImpl. > java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > 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) > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |