Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Can't run TestPersistence test case

184 views
Skip to first unread message

Roman Kuzmin

unread,
Mar 11, 2011, 4:07:27 AM3/11/11
to GWT Mobile
Hi Dennis,

I received you answer via email - thank you, but as you suggested to
ask questions here, let me ask one

I still can't run your TestPersistence java from gwtmobile persistence

I use GwtTestCase. I tried it in both dev and production modes.
I placed "Manual" argument as you suggested:

-Dgwt.args="-port 8888 -codeServerPort 9997 -userAgents safari -
runStyle Manual:1 -gen .gwt-tmp/gen"

I also tried it with just

-Dgwt.args="-runStyle Manual:1"

In all the cases it asks me to point the browser to something like
this:

http://192.168.128.44:1932/com.gwtmobile.persistence.test.gwtmobile_persistence_test.JUnit/junit.html?gwt.codesvr=192.168.128.44:1929

And when I do it with Google Chrome it crashes with following:


java.lang.RuntimeException: Remote test failed at 192.168.128.44 /
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16
(KHTML, like Gecko) Chrome/10.0.648.127 Safari/534.16
at com.google.gwt.junit.JUnitShell.processTestResult(JUnitShell.java:
1259)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1379)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1280)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:625)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
456)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:311)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:
83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)
Caused by: com.google.gwt.junit.JUnitFatalLaunchException: Failed to
load module
"com.gwtmobile.persistence.test.gwtmobile_persistence_test.JUnit".
Please see the log for details.
at
com.google.gwt.junit.server.JUnitHostImpl.service(JUnitHostImpl.java:
135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)

Any suggestions?

Roman Kuzmin

unread,
Mar 11, 2011, 4:30:28 AM3/11/11
to GWT Mobile
Wow. Found working combination.
It works only in production mode, and when I add -Dgwt.args=" -runStyle
Manual:1" it starts ignoring eclipse "Production mode" checkbox.

To make it work use:

-Dgwt.args="-prod -runStyle Manual:1"


11.03.2011 15:07, Roman Kuzmin :

Roman Kuzmin

unread,
Mar 11, 2011, 4:36:04 AM3/11/11
to GWT Mobile
Any chance to start it in development mode?

Dennis Z Jiang

unread,
Mar 11, 2011, 10:09:58 PM3/11/11
to GWT Mobile
Good to know that you are making progress.

The error that you see in development mode is most likely caused by
the GWT Chrome browser plugin. I get the same error each time when I
forget that I am using Linux. The GWT Chrome browser plugin for Linux
only supports the "localhost" IP address. However, GWT JUnit in manual
mode produces a link with the actual IP address. If I simply copy and
paste the link to the browser address bar, I will receive the same
"Failed to load module" error. I have to change the IP to "127.0.0.1"
for it to run.

Knowing that you use Windows, this trick may not work for you. But it
does not hurt to give it a try.

Evgeni Shatohhin

unread,
Nov 8, 2012, 9:23:34 AM11/8/12
to gwtm...@googlegroups.com
wow. i tried changing the ip in url to localhost and it passed further without crashing the test.
that's the reasoning behind this?

суббота, 12 марта 2011 г., 5:09:58 UTC+2 пользователь Dennis Z Jiang написал:
Reply all
Reply to author
Forward
0 new messages