Tuesday, September 28, 2010

JUnit hosted mode test fails with java.net.SocketException: Resource temporarily unavailable: recv failed

I create the default GWT app in Eclipse. It runs fine. Then I create a
simple test and is fails with the following log and junit errors.
Please! I've spent way too much time trying to figure this out alone.
Can anyone help?


Here is the log:


Started code server on port 1600
Starting HTTP on port 0
Starting Jetty on port 0
jetty-6.1.x
Started SelectChannelConnector@0.0.0.0:1604
Started web server on port 1604 . . .
Parsing file:/C:/gwt/MyPerfectApp/war/WEB-INF/web.xml . . .
Loading inherited module 'com.compoz.myperfectapp.MyPerfectApp' . . .
Loading inherited module 'com.google.gwt.junit.JUnit' . . .
Public resources found in...
Translatable source found in...
Refreshing resources
Linking module 'com.compoz.myperfectapp.MyPerfectApp.JUnit' . . .
Validating newly compiled units
Removing invalidated units
Finding entry point classes
Starting http://???.???.0.2:1604/com.compoz.myperfectapp.MyPerfectApp.JUnit/junit-standards.html?gwt.codesvr=???.???.0.2:1600
on browser FF3
200 - GET /com.compoz.myperfectapp.MyPerfectApp.JUnit/junit-
standards.html?gwt.codesvr=???.???.0.2:1600 (???.???.0.2) 2397
bytes . . .
200 - GET /com.compoz.myperfectapp.MyPerfectApp.JUnit/
com.compoz.myperfectapp.MyPerfectApp.JUnit.nocache.js (???.???.0.2)
5199 bytes . . .
logging for HtmlUnit thread
[WARN] Expected content type of 'application/javascript' or
'application/ecmascript' for remotely loaded JavaScript element at
'http://???.???.0.2:1604/com.compoz.myperfectapp.MyPerfectApp.JUnit/
com.compoz.myperfectapp.MyPerfectApp.JUnit.nocache.js', but got
'application/x-javascript'.
200 - GET /com.compoz.myperfectapp.MyPerfectApp.JUnit/hosted.html?
com_compoz_myperfectapp_MyPerfectApp_JUnit (???.???.0.2) 11289
bytes . . .
Connection received from ???.???.0.2:1608
[WARN] Client connection lost
java.net.SocketException: Resource temporarily unavailable: recv
failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at java.io.DataInputStream.readByte(DataInputStream.java:265)
at com.google.gwt.dev.shell.BrowserChannel
$Message.readMessageType(BrowserChannel.java:1100)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
447)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Thread.java:717)
[ERROR] Received QUIT while waiting for return
[ERROR] Unknown exceptionjava.net.SocketException: Software caused
connection abort: socket write error
java.net.SocketException: Software caused connection abort: socket
write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:
109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:
82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.DataOutputStream.flush(DataOutputStream.java:123)
at com.google.gwt.dev.shell.BrowserChannel
$QuitMessage.send(BrowserChannel.java:1245)
at com.google.gwt.dev.shell.BrowserChannel
$QuitMessage.send(BrowserChannel.java:1254)
at
com.google.gwt.dev.shell.BrowserChannelClient.disconnectFromHost(BrowserChannelClient.java:
108)
at
com.google.gwt.dev.shell.BrowserChannelClient.reactToMessages(BrowserChannelClient.java:
230)
at
com.google.gwt.dev.shell.BrowserChannelClient.process(BrowserChannelClient.java:
141)
at
com.google.gwt.dev.shell.HostedModePluginObject.connect(HostedModePluginObject.java:
188)
at com.google.gwt.dev.shell.HostedModePluginObject
$ConnectMethod.call(HostedModePluginObject.java:60)
at
net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:
1702)
at
net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:
845)
at
net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:
164)
at
net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:
429)
at
com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:
269)
at
net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3162)
at
net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:
162)
at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:
559)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine
$4.doRun(JavaScriptEngine.java:524)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine
$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
at
net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:
537)
at
net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:
538)
at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:
531)
at
com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:
906)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:
53)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:
84)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runJob(JavaScriptJobManagerImpl.java:
226)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:
307)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor.run(JavaScriptExecutor.java:
182)
at java.lang.Thread.run(Thread.java:717)
[ERROR] IOException returned from connect null
java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at com.google.gwt.dev.shell.BrowserChannel
$Message.readMessageType(BrowserChannel.java:1100)
at
com.google.gwt.dev.shell.BrowserChannelClient.reactToMessages(BrowserChannelClient.java:
189)
at
com.google.gwt.dev.shell.BrowserChannelClient.process(BrowserChannelClient.java:
141)
at
com.google.gwt.dev.shell.HostedModePluginObject.connect(HostedModePluginObject.java:
188)
at com.google.gwt.dev.shell.HostedModePluginObject
$ConnectMethod.call(HostedModePluginObject.java:60)
at
net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:
1702)
at
net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:
845)
at
net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:
164)
at
net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:
429)
at
com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:
269)
at
net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3162)
at
net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:
162)
at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:
559)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine
$4.doRun(JavaScriptEngine.java:524)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine
$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
at
net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:
537)
at
net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:
538)
at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:
531)
at
com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:
906)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:
53)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:
84)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runJob(JavaScriptJobManagerImpl.java:
226)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:
307)
at
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor.run(JavaScriptExecutor.java:
182)
at java.lang.Thread.run(Thread.java:717)
200 - POST /com.compoz.myperfectapp.MyPerfectApp.JUnit/junithost/
loadError (???.???.0.2)
Request headers
Host: ???.???.0.2:1604
All clients connected (Limiting future permutations to: null)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.0.19) Gecko/2010031422 Firefox/3.0.19
Accept-Language: en-us
Accept: */*
Connection: Keep-Alive
Referer:
http://???.???.0.2:1604/com.compoz.myperfectapp.MyPerfectApp.JUnit/junit-standards.html?gwt.codesvr=???.???.0.2:1600
Content-Type: text/x-gwt-rpc; charset=utf-8
Content-Length: 99
Response headers
Shutdown hook executing


Here is the JUnit log:


java.lang.RuntimeException: Remote test failed at ???.???.0.2 /
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/
2010031422 Firefox/3.0.19
at com.google.gwt.junit.JUnitShell.processTestResult(JUnitShell.java:
1253)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1373)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1274)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:619)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
456)
at junit.framework.TestCase.runBare(TestCase.java:130)
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:120)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:311)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
130)
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.compoz.myperfectapp.MyPerfectApp.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)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment