Hi!
I have just started with gin in my GWT project and I have
followed the tutorial. Now I have
a problem that I cannot figure out. It seems that my DivTestModule class is not
found, even
though it all looks correct in the code, from what I can see. But now I am
getting this error:
Found type 'DivTestInjector'
Resolving annotation '@GinModules(DivTestModule.class)'
[ERROR]
java.lang.ClassNotFoundException: org.gwt.client.gin.DivTestModule
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.google.gwt.dev.javac.TypeOracleMediator.getClassLiteral(TypeOracleMediator.java:753)
at com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationElementValue(TypeOracleMediator.java:664)
at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotationInstance(TypeOracleMediator.java:432)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:826)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:847)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveTypeDeclaration(TypeOracleMediator.java:1374)
at com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:382)
at com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:137)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
Exception in thread "main" java.lang.NullPointerException
at com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationElementValue(TypeOracleMediator.java:694)
at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotationInstance(TypeOracleMediator.java:432)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:826)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:847)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveTypeDeclaration(TypeOracleMediator.java:1374)
at com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:382)
at com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:137)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
Is this anything you have experienced before?
Joakim Sjöberg
Technical Consultant
Artificial Solutions Scandinavia AB
Österlånggatan 43 4tr
111 31 Stockholm
Sweden
Phone: +46 8 586 120 63
Mobile: +46 765 271833
Fax: +46 8 663 67 77
Email: joakim....@artificial-solutions.com
Web: www.artificial-solutions.com
Hi Peter!
Have you had the time to look at this? Is there something you can help me with?
Joakim Sjöberg
From:
googl...@googlegroups.com [mailto:googl...@googlegroups.com] On Behalf
Of Peter Schmitt
Sent: Friday, March 20, 2009 5:12 PM
To: googl...@googlegroups.com
Subject: [google-gin] Re: Problems with java.lang.ClassNotFoundException
I haven't seen a problem like
this before, can you give us some more context (code, package structure,
gwt.xml)? The error looks like it's connected to the initial GWT compilation of
the code, and it looks like the GWT compiler can't find your org.gwt.client.gin.DivTestModule
class. That might be because it's not covered by your classpath or
because it's not in the gwt.xml.
Peter
I have realized that I need Guice also to make Gin work, I have when I get this error below Guice 1.0 installed. Saw now that I need a trunk build (r803 or higher), were can I get that?
Regards
Joakim
From:
googl...@googlegroups.com [mailto:googl...@googlegroups.com] On Behalf
Of Peter Schmitt
Sent: Friday, March 20, 2009 5:12 PM
To: googl...@googlegroups.com
Subject: [google-gin] Re: Problems with java.lang.ClassNotFoundException
I haven't seen a problem like
this before, can you give us some more context (code, package structure,
gwt.xml)? The error looks like it's connected to the initial GWT compilation of
the code, and it looks like the GWT compiler can't find your org.gwt.client.gin.DivTestModule
class. That might be because it's not covered by your classpath or
because it's not in the gwt.xml.
Peter
Ah ok so It works with the 2.0 Beta?
Great, could the problems we are experience below come from that we are using version 1.0?
// Joakim
Hi I have now tried with 2.0 version and I am still getting the same error:
Found type 'DivTestInjector'
Resolving annotation '@GinModules(DivTestModule.class)'
[ERROR]
java.lang.ClassNotFoundException: org.gwt.client.gin.DivTestModule
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
Can anyone help me with this?
I have added the few java files I am using for my test, maybe I am doing something wrong?
Was there anyone who could help me with this issue? Since I’m totally stuck I really need some help J
// Joakim
Hi Peter!
I changed the name of my package to org.source, org.source.client and org.soruce.gin but I still get the same problem. Is there anything else I have to think of?
Thank you for all the help so far.
´Hi Peter!
I took a look at this code but since I’m quite new to this I
really don´t understand what to check for J
is there some way I can upload my whole project to you? Will that help? I use
the same libraries now
as you do at least but no changes, still the same error.
Hope you can forgive me for all the questions, it just seems that I am so close to get this working, and
I really want it to work J
Oh and I am using Netbeans and GWT 1.5.3 if that makes any difference.