Hello,
As my application gets broadened, I have decided to apply JUnit test so I
can prevent NullPointerException
as much as possible especially in Activity & Place as well as
RequestFactory.
However, I am trying to perform tests on ClientFactory, I have been able to
pass arguments to JUnit like the
followijng:
gwt.test.jvmargs=-Xmx256M -Dgwt.args="-testBeginTimeout 5"
-Dgwt.args="-prod" -Dgwt.args="-runStyle Manual:1"
When I ran the test, I am getting InternalCompilerException. Below is the
error stack:
Validating newly compiled units
[ERROR] Errors in
'jar:file:/D:/gwt-2.1.1/gwt-user.jar!/com/google/gwt/logging/client/LogConfiguration.java'
[ERROR] Line 77: The method addHandler(Handler) is undefined for the
type Logger
[ERROR] Failed to create an instance of
'com.google.gwt.junit.client.impl.JUnitHost' via deferred binding
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during
visit.
at
com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:466)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:452)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:667)
at
com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:224)
at
com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:219)
at
com.google.gwt.dev.js.ast.JsInvocation.traverse(JsInvocation.java:64)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:286)
at
com.google.gwt.dev.js.ast.JsArrayAccess.traverse(JsArrayAccess.java:72)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:311)
at
com.google.gwt.dev.js.ast.JsBinaryOperation.traverse(JsBinaryOperation.java:108)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:509)
at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:37)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:1002)
at
com.google.gwt.dev.js.JsSourceGenerationVisitor.visit(JsSourceGenerationVisitor.java:48)
at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:43)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:423)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:98)
at
com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:255)
at
com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:242)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:49)
at
com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:1215)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1039)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at
com.google.gwt.junit.client.impl.JUnitHost_Proxy.<clinit>(JUnitHost_Proxy.java:15)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:654)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:458)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at
com.google.gwt.junit.client.impl.GWTRunner.<init>(GWTRunner.java:184)
at
com.google.gwt.junit.client.impl.GWTRunnerImplgecko1_8.<init>(GWTRunnerImplgecko1_8.java:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:375)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.SecurityException: Prohibited package name: java.io
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1011)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassFromBinaryName(CompilingClassLoader.java:236)
at
com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassFromBinaryOrSourceName(CompilingClassLoader.java:266)
at
com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getClassInfoFromClassName(CompilingClassLoader.java:288)
at
com.google.gwt.dev.shell.CompilingClassLoader$DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:146)
at
com.google.gwt.dev.shell.CompilingClassLoader.getDispId(CompilingClassLoader.java:930)
at
com.google.gwt.dev.shell.Jsni$JsSourceGenWithJsniIdentFixup.visit(Jsni.java:105)
at com.google.gwt.dev.js.ast.JsNameRef.traverse(JsNameRef.java:121)
at
com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:450)
... 61 more
[ERROR] Failed to create an instance of
'com.google.gwt.junit.client.impl.GWTRunner' via deferred binding
java.lang.RuntimeException: Deferred binding failed for
'com.google.gwt.junit.client.impl.JUnitHost' (did you forget to inherit a
required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at
com.google.gwt.junit.client.impl.GWTRunner.<init>(GWTRunner.java:184)
at
com.google.gwt.junit.client.impl.GWTRunnerImplgecko1_8.<init>(GWTRunnerImplgecko1_8.java:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:375)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous
log entries)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:503)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
... 13 more
[ERROR] Unable to load module entry point class
com.google.gwt.junit.client.impl.GWTRunner (see associated exception for
details)
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:503)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:375)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
[ERROR] Failed to load module 'org.opevel.projectname.JUnit' from user agent
'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.19) Gecko/20110420
Firefox/3.5.19 GTB7.1' at localhost:2034
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:434)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
Will appreciate some assistance.
Regards
--
Odeyemi 'Kayode O.
http://www.sinati.com
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.