On Wednesday 02 September 2009 09:14:04 pm Andreas Joseph Krogh wrote:
> On Wednesday 02 September 2009 05:13:10 pm Wes Wannemacher wrote:
> > For me, the build wasn't failing, it was hanging... The problem was a
> > backslash instead of file.separator (or whatever the property is now).
> >
> > I've been meaning to look into these failures. The failure is caused
> > by an IllegalStateException -
> >
> > http://hudson.zones.apache.org/hudson/view/Struts/job/struts2/org.apache.struts$struts2-embeddedjsp-plugin/135/testReport/org.apache.struts2/EmbeddedJSPResultTest/testEmbedded/
> >
> > @Andreas
> > If you have time to look into it and create a patch, that'd be great!
> > Otherwise, you can comment out embeddedjsp from the modules section of
> > the plugins' directory pom.xml file and skip it.
>
> Ok, I'll put on my patch hat and have a look...
Hm, strange. If I comment out all modules in struts2-parent-pom but "plugins"
and then comment out all plugins except the "embeddedjsp" plugin running "mvn
test" from <struts2-root> works. Then, if I enable the "testng"-plugin and
delete all tests, and only having StrutsTestCase in
src/main/org/apache/struts2/, it fails again.
So it's something going on with the classloader when certain modules are
enabled, resulting in classpath-resources not working correctly in tests.
Running "mvn test" in the plugins/embededjsp directory also works fine.
The error is:
-------------------------------------------------------------------------------
Test set: org.apache.struts2.EmbeddedJSPResultTest
-------------------------------------------------------------------------------
Tests run: 16, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.277 sec <<<
FAILURE!
testEmbedded(org.apache.struts2.EmbeddedJSPResultTest) Time elapsed: 0.03 sec
<<< ERROR!
java.lang.IllegalStateException: org.apache.struts2.jasper.JasperException:
File "dir/all.jsp" not found
at
org.apache.struts2.ServletCache.launderThrowable(ServletCache.java:72)
at org.apache.struts2.ServletCache.get(ServletCache.java:61)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:63)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:45)
at
org.apache.struts2.EmbeddedJSPResult.doExecute(EmbeddedJSPResult.java:32)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at
org.apache.struts2.EmbeddedJSPResultTest.testEmbedded(EmbeddedJSPResultTest.java:63)
Caused by: org.apache.struts2.jasper.JasperException: File "dir/all.jsp" not
found
at
org.apache.struts2.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at
org.apache.struts2.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at
org.apache.struts2.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at
org.apache.struts2.jasper.compiler.JspUtil.getInputStream(JspUtil.java:832)
at
org.apache.struts2.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:101)
at
org.apache.struts2.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:306)
at
org.apache.struts2.jasper.compiler.ParserController.doParse(ParserController.java:170)
at
org.apache.struts2.jasper.compiler.ParserController.parse(ParserController.java:101)
at
org.apache.struts2.jasper.compiler.Compiler.generateJava(Compiler.java:154)
at
org.apache.struts2.jasper.compiler.Compiler.compile(Compiler.java:292)
at org.apache.struts2.jasper.JspC.processFile(JspC.java:847)
at org.apache.struts2.jasper.JspC.execute(JspC.java:917)
at org.apache.struts2.JSPLoader.compileJSP(JSPLoader.java:230)
at org.apache.struts2.JSPLoader.load(JSPLoader.java:77)
at org.apache.struts2.ServletCache$1.call(ServletCache.java:46)
at org.apache.struts2.ServletCache$1.call(ServletCache.java:44)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.struts2.ServletCache.get(ServletCache.java:53)
... 50 more
testEmbeddedAbsolutePath(org.apache.struts2.EmbeddedJSPResultTest) Time
elapsed: 0.001 sec <<< ERROR!
java.lang.IllegalStateException: org.apache.struts2.jasper.JasperException:
File "dir/all.jsp" not found
at
org.apache.struts2.ServletCache.launderThrowable(ServletCache.java:72)
at org.apache.struts2.ServletCache.get(ServletCache.java:61)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:63)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:45)
at
org.apache.struts2.EmbeddedJSPResult.doExecute(EmbeddedJSPResult.java:32)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at
org.apache.struts2.EmbeddedJSPResultTest.testEmbeddedAbsolutePath(EmbeddedJSPResultTest.java:90)
Caused by: org.apache.struts2.jasper.JasperException: File "dir/all.jsp" not
found
at
org.apache.struts2.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at
org.apache.struts2.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at
org.apache.struts2.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at
org.apache.struts2.jasper.compiler.JspUtil.getInputStream(JspUtil.java:832)
at
org.apache.struts2.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:101)
at
org.apache.struts2.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:306)
at
org.apache.struts2.jasper.compiler.ParserController.doParse(ParserController.java:170)
at
org.apache.struts2.jasper.compiler.ParserController.parse(ParserController.java:101)
at
org.apache.struts2.jasper.compiler.Compiler.generateJava(Compiler.java:154)
at
org.apache.struts2.jasper.compiler.Compiler.compile(Compiler.java:292)
at org.apache.struts2.jasper.JspC.processFile(JspC.java:847)
at org.apache.struts2.jasper.JspC.execute(JspC.java:917)
at org.apache.struts2.JSPLoader.compileJSP(JSPLoader.java:230)
at org.apache.struts2.JSPLoader.load(JSPLoader.java:77)
at org.apache.struts2.ServletCache$1.call(ServletCache.java:46)
at org.apache.struts2.ServletCache$1.call(ServletCache.java:44)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.struts2.ServletCache.get(ServletCache.java:53)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:63)
at org.apache.struts2.JSPRuntime.handle(JSPRuntime.java:45)
at
org.apache.struts2.EmbeddedJSPResult.doExecute(EmbeddedJSPResult.java:32)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at
org.apache.struts2.EmbeddedJSPResultTest.testEmbedded(EmbeddedJSPResultTest.java:63)
... 45 more
Anyone?
BTW: I'm unable to compile struts2 in IDEA; It complains about:
Error: javac: source release 1.6 requires target release 1.6
If I disable [X]make before running tests it complains about:
java.lang.NoSuchMethodError: org.easymock.EasyMock.replay([Ljava/lang/Object;)V
at
org.apache.struts2.EmbeddedJSPResultTest.setUp(EmbeddedJSPResultTest.java:228)
at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Any of you Struts'ers using IDEA got this working? I've imported the root-pom
and let IDEA build the project based on that.
--
Andreas Joseph Krogh <[email protected]>
Senior Software Developer / CTO
------------------------+---------------------------------------------+
OfficeNet AS | The most difficult thing in the world is to |
Rosenholmveien 25 | know how to do a thing and to watch |
1414 TrollÄsen | somebody else doing it wrong, without |
NORWAY | comment. |
| |
Tlf: +47 24 15 38 90 | |
Fax: +47 24 15 38 91 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]