Re: EclEmma + GwtTestCase + GwtGenerator exception

45 views
Skip to first unread message

Gal Dolber

unread,
Jul 22, 2010, 3:51:02 AM7/22/10
to google-we...@googlegroups.com
Forgot the example:

Under a GWTTestCase..

public void testFailureGenerator() {
try {
     GWT.create(BadInterface.class);
} catch (RuntimeException e)  {
     return;
}
fail();
}

2010/7/22 Gal Dolber <gal.d...@gmail.com>
Hi, I am working on a gwtTestCase that call a gwtGenerator and do something, no matter what.
I downloaded and patched eclEmma to work with gwt and it works fine.
The problem I have is when I try to test a gwtGenerator failure, the test goes ok, it captures the exception ok, but eclEmma is not marking the code before the exception happen in green.

It doesn't sound like a big problem, but even if I still make those tests, I don't know what failure cases I am really testing, and well.. I want to see 100% in emma report :)

Is there anything to do here or thats just the way eclEmma works?

--
http://ajax-development.blogspot.com/



--
http://ajax-development.blogspot.com/

Gal Dolber

unread,
Jul 23, 2010, 4:03:51 AM7/23/10
to google-we...@googlegroups.com

mP

unread,
Jul 23, 2010, 9:34:48 PM7/23/10
to Google Web Toolkit
Wheres the stacktrace ? wheres the problem description ? A little help
might encourage someone to respond or fix the problem.

Gal Dolber

unread,
Jul 23, 2010, 11:40:54 PM7/23/10
to google-we...@googlegroups.com
The exception happens in the Generator... 

generate(TreeLogger logger ..) throw UnableToCompleteException {
throw new UnableToCompleteException();
}

2010/7/23 mP <miroslav...@gmail.com>
Wheres the stacktrace ? wheres the problem description ? A little help
might encourage someone to respond or fix the problem.

--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
http://ajax-development.blogspot.com/

Island

unread,
Aug 16, 2010, 9:21:14 AM8/16/10
to Google Web Toolkit
I am facing the same problem when I try to collect the code coverage
data, and here is the stack trace:

21:10:59.578 [ERROR] [splat] Failed to create an instance of
'com.splat.client.SplatService' via deferred binding
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error
during visit.
at
com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java:
462)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
448)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:
801)
at com.google.gwt.dev.js.ast.JsVars$JsVar.traverse(JsVars.java:56)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:
814)
at com.google.gwt.dev.js.ast.JsVars.traverse(JsVars.java:89)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:
873)
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:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:
253)
at
com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:
240)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:
46)
at
com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:
1214)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:
1039)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
com.splat.client.SplatService_Proxy.<clinit>(SplatService_Proxy.java:
14)
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:
580)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
415)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.splat.client.SplatGxt.onModuleLoad(SplatGxt.java:97)
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:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
369)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException: null
at com.google.gwt.dev.shell.CompilingClassLoader
$MyInstanceMethodOracle.findOriginalDeclaringClass(CompilingClassLoader.java:
409)
at com.google.gwt.dev.shell.rewrite.RewriteRefsToJsoClasses
$MyMethodAdapter.visitMethodInsn(RewriteRefsToJsoClasses.java:83)
at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:
1371)
at com.google.gwt.dev.asm.ClassReader.accept(ClassReader.java:420)
at
com.google.gwt.dev.shell.rewrite.HostedModeClassRewriter.rewrite(HostedModeClassRewriter.java:
244)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClassBytes(CompilingClassLoader.java:
1157)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:
985)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
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:
120)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:
801)
at com.google.gwt.dev.js.ast.JsVars$JsVar.traverse(JsVars.java:56)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.visit(JsToStringGenerationVisitor.java:
814)
at com.google.gwt.dev.js.ast.JsVars.traverse(JsVars.java:89)
at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.js.JsToStringGenerationVisitor.printJsBlock(JsToStringGenerationVisitor.java:
873)
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:
446)
at com.google.gwt.dev.js.ast.JsVisitor.doAccept(JsVisitor.java:
421)
at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97)
at
com.google.gwt.dev.shell.Jsni.generateJavaScriptForHostedMode(Jsni.java:
253)
at
com.google.gwt.dev.shell.Jsni.getJavaScriptForHostedMode(Jsni.java:
240)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.createNativeMethods(ModuleSpaceOOPHM.java:
46)
at
com.google.gwt.dev.shell.CompilingClassLoader.injectJsniMethods(CompilingClassLoader.java:
1214)
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:
1039)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
com.splat.client.SplatService_Proxy.<clinit>(SplatService_Proxy.java:
14)
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:
580)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
415)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.splat.client.SplatGxt.onModuleLoad(SplatGxt.java:97)
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:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
369)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Thread.java:619)

Gal Dolber

unread,
Aug 17, 2010, 7:37:41 PM8/17/10
to google-we...@googlegroups.com
Finally someone :)

2010/8/16 Island <qzh...@gmail.com>

--

Qi Zhang

unread,
Aug 18, 2010, 12:48:37 AM8/18/10
to google-we...@googlegroups.com
I have resolved the problem after I debugged into GWT code.  I am using GXT to build my Web Interface, but that GXT libraries was built with an old version of GWT, so some method signature could not be matched by GWT CompileClassLoader. After I upgraded my GXT libraries, the problem disappeared.
Reply all
Reply to author
Forward
0 new messages