Activities and Places - Ant compilation

244 views
Skip to first unread message

Jeanpylone

unread,
Dec 1, 2011, 12:30:16 PM12/1/11
to google-we...@googlegroups.com
Hi there!

Is there some special flag/classpath to add when a GWT project using Activities and Places is compiled with Ant?
While it is compiling successfully with the GPE compilation, it fails under Ant with a stacktrace like this:

 
  [java] Compiling module test.MainModule
     [java]    Resolving test.client.mapping.AppPlaceHistoryMapper
     [java]       Found type 'test.client.mapping.AppPlaceHistoryMapper'
     [java]          [ERROR] Annotation error: cannot resolve test.client.places.HomePlace$HomePlaceTokenizer
     [java] java.lang.ClassNotFoundException: test.client.places.HomePlace$HomePlaceTokenizer
     [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java] ...
     [java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
     [java]          [ERROR] Annotation error: expected class java.lang.Class, got null
     [java]          [ERROR] Annotation error: cannot resolve test.client.places.ListPlace$ListPlaceTokenizer
     [java] java.lang.ClassNotFoundException: test.client.places.ListPlace$ListPlaceTokenizer
     [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java] ...
     [java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
     [java]          [ERROR] Annotation error: expected class java.lang.Class, got null
     [java]    Scanning for additional dependencies: file:/test/client/MainModule.java
     [java]       Computing all possible rebind results for 'test.client.mapping.AppPlaceHistoryMapper'
     [java]          Rebinding test.client.mapping.AppPlaceHistoryMapper
     [java]             Invoking generator com.google.gwt.place.rebind.PlaceHistoryMapperGenerator
     [java]                [ERROR] Generator 'com.google.gwt.place.rebind.PlaceHistoryMapperGenerator' threw an exception while rebinding 'test.client.mapping.AppPlaceHistoryMapper'
     [java] java.lang.NullPointerException
     [java] at com.google.gwt.place.rebind.PlaceHistoryGeneratorContext.getWithTokenizerEntries(PlaceHistoryGeneratorContext.java:285)
     [java] ...
     [java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
     [java]       [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
     [java]          [WARN] test.client.mapping.AppPlaceHistoryMapperImpl
     [java]    [ERROR] Errors in 'file:/test/client/MainModule.java'
     [java]       [ERROR] Line 33:  Failed to resolve 'test.client.mapping.AppPlaceHistoryMapper' via deferred binding
     [java]    [ERROR] Cannot proceed due to previous errors


Any idea will be appreciated :)


Ashton Thomas

unread,
Dec 1, 2011, 2:41:15 PM12/1/11
to google-we...@googlegroups.com
I think the problem is in your application code and not an issue with a flag or adding anything to the classpath. Can you include your Mapper and Place(s) files?

Thomas Broyer

unread,
Dec 1, 2011, 7:35:51 PM12/1/11
to google-we...@googlegroups.com
Well, if it compiles with the GPE, it's likely an issue with the Ant script, right?

It looks like the client-side classes haven't been compiled (javac) or that the output from javac is not in the classpath for the GWT compiler.

Ashton Thomas

unread,
Dec 1, 2011, 10:32:03 PM12/1/11
to Google Web Toolkit
My bad, I didn't read that part.. damn..

Karthik Reddy

unread,
Dec 2, 2011, 1:37:34 AM12/2/11
to google-we...@googlegroups.com
"Classes referenced from annotations have to be compiled for GWT to be able to process them from within generators (as is the case for @WithTokenizers on a PlaceHistoryMapper)."



--
Karthik Reddy

Jeanpylone

unread,
Dec 2, 2011, 3:42:28 AM12/2/11
to google-we...@googlegroups.com
My Bad!!!
Sorry, I think I should sleep longer sometimes...
In fact I was doing it right (class compiled before gwt compile and so on ...) But my pathelement to class files was just wrong!

Thank you all for your answers !
Reply all
Reply to author
Forward
0 new messages