Compiling from command line - Annotation errors

714 views
Skip to first unread message

Jy

unread,
Oct 8, 2012, 9:57:34 PM10/8/12
to google-we...@googlegroups.com
Hello,

I'm trying to automate the process of deploying new gwt code by automating the compile process.  I've google around a ton and can't seem to find any solutions.  It's funny because it compiles no problem in Eclipse, but trying to compile on the command line has been a pain.  The errors I keep getting are essentially like so:

Compiling module com.proximate.proximate
   Resolving com.proximate.client.AppPlaceHistoryMapper
      Found type 'com.proximate.client.AppPlaceHistoryMapper'
         [ERROR] Annotation error: cannot resolve com.proximate.client.place.Home$Tokenizer
java.lang.ClassNotFoundException: com.proximate.client.place.Home$Tokenizer
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:750)
        at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:689)
        at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation(TypeOracleMediator.java:498)
        at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:648)
        at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:663)
        at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:809)
        at com.google.gwt.dev.javac.TypeOracleMediator.addNewTypes(TypeOracleMediator.java:439)
        at com.google.gwt.dev.javac.TypeOracleMediatorFromSource.addNewUnits(TypeOracleMediatorFromSource.java:52)
        at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:164)
        at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:82)
        at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:450)
        at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:370)
        at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:360)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:252)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
        at com.google.gwt.dev.Compiler.run(Compiler.java:232)
        at com.google.gwt.dev.Compiler.run(Compiler.java:198)
        at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
        at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
        at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
        at com.google.gwt.dev.Compiler.main(Compiler.java:177)
         [ERROR] Annotation error: expected class java.lang.Class, got null
         [ERROR] Annotation error: cannot resolve com.proximate.client.place.Marketplace$Tokenizer







Please help someone!

Juan Pablo Gardella

unread,
Oct 8, 2012, 11:15:41 PM10/8/12
to google-we...@googlegroups.com
Do you try with maven?

2012/10/8 Jy <jwi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/dVipRGZ0ZsEJ.
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.

Thomas Broyer

unread,
Oct 9, 2012, 2:31:28 AM10/9/12
to google-we...@googlegroups.com
You have to "javac" your classes and give both the *.class and *.java to the GWT compiler. This is why it works in Eclipse: because Eclipse automatically compiles your source files, and the output folder is added to the classpath of the GWT Compiler.

YinYanSI

unread,
Oct 9, 2014, 3:54:19 PM10/9/14
to google-we...@googlegroups.com
You Sholud add GWT Project into classpath in Eclipse 
Run configurationi (classpath under User Entries) 
klikd button "Add project.." and check Your GWT Project. 
Apply Run configuration
and Run

Othere settins are

Main class: com.google.gwt.dev.codeserver.CodeServer

Arg: za CodeServer klasso
Program Argumennts: -bindAddress 0.0.0.0 com.ajna4taiga.recycling.YourGWTModule
VM Arguments: -Xmx1024m

Classpath should also have src of your GWT project
classpath 
User Entries
Advance (button)
Advance folder (add src directory of your GWT project)
Applay Save run configuration

Classpath should also have 
gwt-servercode.jar gwt-dev.jar gwt-user.jar validation-api-1.0.0.GA.jar validation-api-1.0.0.GA-sources.jar mgwt-2.0.0.jar

mgwt if you have mgwt project of Daniel Kurka. If you have just gwt proje then you don't
need mgwt-2.0.0.jar



On Tuesday, October 9, 2012 3:57:34 AM UTC+2, Jy wrote:

YinYanSI

unread,
Oct 9, 2014, 4:02:12 PM10/9/14
to google-we...@googlegroups.com
If Error SDM compile: 
   Finding entry point classes
      [ERROR] Unable to find type 'com.company.project.client.YourGWTApp'
         [ERROR] Hint: Check that the type name 'com.ajna4taiga.recycling.client.RecyclingEntryPoint' is really what you meant
         [ERROR] Hint: Check that your classpath includes all required source roots
[ERROR] Compiler returned false

add classpath  run configuration for SDM
User Entries
Advance (button)
Advance folder (add src direcotry of your YourGWTApp project)
Applay Save run configuration

if bellow error
Compiling module com.company.project.YourGWTApp
   Resolving com.ajna4taiga.recycling.client.AppPlaceHistoryMapper
      Found type 'com.company.project.client.AppPlaceHistoryMapper'
         [ERROR] Annotation error: cannot resolve com.company.project.client.places.HomePlace$HomePlaceTokenizer
         
You should add in your run coniguration for your SDM 
add your GWT project in classpath 
User Entries
button Add Project
pa check YourGWTApp project   

On Tuesday, October 9, 2012 3:57:34 AM UTC+2, Jy wrote:
Reply all
Reply to author
Forward
0 new messages