Ok. I think the problem is being misunderstood. I am trying to run a Junit GWTTestCase. I get the stack trace shown below. I also pasted the relevant section of my test case.
- I think user and servlet should NOT be provided...I need them in my runtime to run GWT.
- I think I do need dev in my test scope, as JUnitShell relies on it.
Ok. I think the problem is being misunderstood. I am trying to run a GWTTestCase. I get the stack trace shown below. I also pasted the relevant section of my test case.
- I think user and servlet should NOT be provided...I need them in my runtime to run GWT.
- I think I do need dev in my test scope, as JUnitShell relies on it.
public String getModuleName()
{
return " ca.nanometrics.apollo.server.ui.Apollo";
}
public void testStuff()
{
SideBarPageInfo pageInfo = AboutPage.init(); // AboutPage extends SideBarPage
SideBarPage page = pageInfo.createInstance (); // SideBarPage extends Composite
assertEquals("About", pageInfo.getName());
assertNotNull(page.getElement());
}
You might try using the 8.3 name for documents and settings though, in
the meantime. (docume~1)
On Feb 27, 12:05 pm, "Ben Tatham" <bentat...@gmail.com> wrote:
> Note that there are problems with my solution in windows because of the
> spaces in c:\Documents and Settings...
>
> -------------------------------------------------------------------------------
> Test set: ca.nanometrics.apollo.server.ui.client.AboutPageTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.516 sec
> <<< FAILURE!
> testStuff(ca.nanometrics.apollo.server.ui.client.AboutPageTest) Time
> elapsed: 0.39 sec <<< ERROR!
> java.lang.ExceptionInInitializerError
> at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:177)
> 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 com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:114)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> 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:585)
> at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> JUnitTestSet.java:210)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> AbstractDirectoryTestSuite.java:135)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> AbstractDirectoryTestSuite.java:122)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(
> SurefireBooter.java:747)
> Caused by: java.lang.IllegalArgumentException
> at java.net.URI.create(URI.java:842)
> at com.google.gwt.util.tools.Utility.computeInstallationPath(
> Utility.java:287)
> at com.google.gwt.util.tools.Utility.getInstallPath(Utility.java:223)
> at com.google.gwt.util.tools.ToolBase.<clinit>(ToolBase.java:55)
> ... 23 more
> Caused by: java.net.URISyntaxException: Illegal character in path at index
> 18: file:/C:/Documents and
> Settings/ben/.m2/repository/com/google/gwt/gwt-dev-windows/1.3.3/gwt-
> dev-windows-1.3.3.jar
> at java.net.URI$Parser.fail(URI.java:2809)
> at java.net.URI$Parser.checkChars(URI.java:2982)
> at java.net.URI$Parser.parseHierarchical(URI.java:3066)
> at java.net.URI$Parser.parse(URI.java:3014)
> > DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:585)
> > at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > JUnitTestSet.java:210)
> > at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> > AbstractDirectoryTestSuite.java:135)
> > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > AbstractDirectoryTestSuite.java:122)
> > at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> > 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:585)
> > at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > SurefireBooter.java:225)
> > at org.apache.maven.surefire.booter.SurefireBooter.main (
> > SurefireBooter.java:747)
>
> > I don't think my code matters, because the missing class happens well
> > before it gets to here in the stack trace, but just in case...
>
> > public String getModuleName()
> > {
> > return " ca.nanometrics.apollo.server.ui.Apollo";
> > }
>
> > public void testStuff()
> > {
> > SideBarPageInfo pageInfo = AboutPage.init(); // AboutPage extends
> > SideBarPage
> > SideBarPage page = pageInfo.createInstance (); // SideBarPage extends
> > Composite
> > assertEquals("About", pageInfo.getName());
> > assertNotNull(page.getElement());
> > }
>
> > On 2/26/07, Robert kebernet Cooper <keber...@gmail.com> wrote:
>
> > > Ugh. Sorry, I was answering the wrong question. You don't need the dev
> > > jar at all. You need the *user* jar as a "provided", the *servlet* jar as
> > > "provided" and the dev jar will be used out of the specified gwt install
> > > directory. Sorry for the confusion.
>
> > > On 2/26/07, Ben Tatham < bentat...@gmail.com> wrote:
>
> > > > whats the groupId/artifactId? I don't see it in your mavenrep
>
> > > > On 2/26/07, Robert kebernet Cooper < keber...@gmail.com > wrote:
>
> > > > > You shouldn't have the dev jar as a dependency, but you should set
> > > > > dev as a dep with a "provided" scope.
>
> > > > > On 2/26/07, Ben Tatham < bentat...@gmail.com> wrote:
>
> > > > > > Is the gwt dev jar supposed to be added as a dependency with this
> > > > > > plugin?
>
> > > > > > I want to run Junit test cases, so how do manually add the
> > > > > > development jar (like gwt-dev-windows-1.3.3.jar as a dependency
> > > > > > (test scope).
>
> > > > > > -Ben
>
> > > > > > --
> > > > > > ***************************************
> > > > > > Check our website for pictures
> > > > > > of Abigail Etta
> > > > > > http://www.tatham.ca
> > > > > > ***************************************
>
> > > > > --
> > > > > :Robert "kebernet" Cooper
> > > > > :: keber...@gmail.com
> > > > > Alice's cleartext
> > > > > Charlie is the attacker
> > > > > Bob signs and encrypts
> > > > >http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8
>
> > > > --
> > > > ***************************************
> > > > Check our website for pictures
> > > > of Abigail Etta
> > > > http://www.tatham.ca
> > > > ***************************************
>
> > > --
> > > :Robert "kebernet" Cooper
> > > ::keber...@gmail.com
I will try to run my m1 tests using the m2 plugin soon and see what I
can find out.
You might try using the 8.3 name for documents and settings though, in
the meantime. (docume~1)
On Feb 27, 12:05 pm, "Ben Tatham" <bentat...@gmail.com > wrote:
> Note that there are problems with my solution in windows because of the
> spaces in c:\Documents and Settings...
>
> -------------------------------------------------------------------------------
> Test set: ca.nanometrics.apollo.server.ui.client.AboutPageTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.516 sec
> <<< FAILURE!
> testStuff(ca.nanometrics.apollo.server.ui.client.AboutPageTest) Time
> elapsed: 0.39 sec <<< ERROR!
> java.lang.ExceptionInInitializerError
> at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:177)
> 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 com.google.gwt.junit.client.GWTTestCase.run (GWTTestCase.java:114)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> 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:585)
> at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> JUnitTestSet.java:210)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet (
> AbstractDirectoryTestSuite.java:135)
> at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> AbstractDirectoryTestSuite.java:122)
> at org.apache.maven.surefire.Surefire.run (Surefire.java:129)
> 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:585)
> at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java :225)
> at org.apache.maven.surefire.booter.SurefireBooter.main(
> SurefireBooter.java:747)
> Caused by: java.lang.IllegalArgumentException
> at java.net.URI.create(URI.java:842)
> at com.google.gwt.util.tools.Utility.computeInstallationPath(
> Utility.java:287)
> at com.google.gwt.util.tools.Utility.getInstallPath(Utility.java:223)
> at com.google.gwt.util.tools.ToolBase.<clinit>( ToolBase.java:55)
> > AbstractDirectoryTestSuite.java:135)
> > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > AbstractDirectoryTestSuite.java:122)
> > at org.apache.maven.surefire.Surefire.run (Surefire.java:129)
> > 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:585)
> > at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess (
After we get the test stuff ironed out it might be good to use a
"sample" project like this one, that is the same project, but works on
M1 or M2.
Advise.
On Mar 2, 4:03 pm, "Robert \"kebernet\" Cooper" <keber...@gmail.com>
wrote:
> It simply won't work. I will look into it this weekend.
>
> On 3/2/07, charlie.coll...@gmail.com <charlie.coll...@gmail.com> wrote:
>
>
>
> > I will try to run my m1 tests using the m2 plugin soon and see what I
> > can find out.
>
> > You might try using the 8.3 name for documents and settings though, in
> > the meantime. (docume~1)
>
> > On Feb 27, 12:05 pm, "Ben Tatham" <bentat...@gmail.com> wrote:
> > > Note that there are problems with my solution in windows because of the
> > > spaces in c:\Documents and Settings...
>
> > -------------------------------------------------------------------------------
> > > Test set: ca.nanometrics.apollo.server.ui.client.AboutPageTest
>
> > -------------------------------------------------------------------------------
> > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.516sec
> > > <<< FAILURE!
> > > testStuff(ca.nanometrics.apollo.server.ui.client.AboutPageTest) Time
> > > elapsed: 0.39 sec <<< ERROR!
> > > java.lang.ExceptionInInitializerError
> > > at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java
> > :177)
> > > 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 com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:114)
> > > at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > at junit.framework.TestSuite.run(TestSuite.java:203)
> > > 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:585)
> > > at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > > JUnitTestSet.java:210)
> > > at
>
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> > > AbstractDirectoryTestSuite.java:135)
> > > at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > > AbstractDirectoryTestSuite.java:122)
> > > at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> > > 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:585)
> > > at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > SurefireBooter.java:225)
> > > at org.apache.maven.surefire.booter.SurefireBooter.main(
> > > SurefireBooter.java:747)
> > > Caused by: java.lang.IllegalArgumentException
> > > at java.net.URI.create(URI.java:842)
> > > at com.google.gwt.util.tools.Utility.computeInstallationPath(
> > > Utility.java:287)
> > > at com.google.gwt.util.tools.Utility.getInstallPath(Utility.java
> > :223)
> > > at com.google.gwt.util.tools.ToolBase.<clinit>(ToolBase.java:55)
> > > > AbstractDirectoryTestSuite.java:135)
> > > > at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > > > AbstractDirectoryTestSuite.java:122)
> > > > at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> ...
>
> read more »
I've gotten the GWTShell running by adding the gwt-dev-windows as a
dependency. I had to copy the two .dll files it was depending on. Not
an elegant solution.
But it's still running into problems with a ClassNotFoundException on
com.google.gwt.dev.shell.GWTShellServlet. This is causing a 20 second
timeout.
So the tests still aren't running. Full stack trace below.
Thanks,
Justin
_____________________________________________________________________
Running com.example.client.IntegrationTest
[WARN] StandardContext[]Error loading WebappClassLoader
delegate: false
repositories:
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@a39137
com.google.gwt.dev.shell.GWTShellServlet
java.lang.ClassNotFoundException:
com.google.gwt.dev.shell.GWTShellServlet
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1340)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1189)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
964)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
687)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
144)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
[WARN] StandardWrapperValve[shell]: Allocate exception for servlet
shell
javax.servlet.ServletException: Wrapper cannot find servlet class
com.google.gwt.dev.shell.GWTShellServlet or a class it depe
nds on
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
974)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
687)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
144)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 22.609
sec <<< FAILURE!
I've got the GWTShell loading during a test by adding the gwt-dev-
windows as a dependency. I had to include two .dll files that were
required as well. Not an elegant solution by any means.
But the tests still wouldn't run because apparently the
com.google.gwt.dev.shell.GWTShellServlet wasn't being found
(ClassNotFoundException). Not sure what the issue is. So the test
timed out after 20 seconds.
Below is the stack trace. Hopefully all this helps.
Thanks,
Justin
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 22.609
sec <<< FAILURE!
On Mar 4, 9:22 am, "charlie.coll...@gmail.com"
> ...
>
> read more »