David,
In the IDE, to debug, if you are running in "hosted" mode on the internal jetty server using a plugin that compile the source (IE Google Plugin for Eclipse), if you make a modification while debugging, then run maven compile while still running debug, it could cause multiple compilations of the file and corruption in the gwtUnitCache.Jonathon Lamon
Principal Software Engineer
Perceptronics Solutions Inc.
Tel 703-485-2922
Cell 269-205-4649
www.percsolutions.com
Principal Software Engineer
Perceptronics Solutions Inc.
Tel 703-485-2922
Cell 269-205-4649
www.percsolutions.com
On Mon, Jan 13, 2014 at 8:38 AM, David Hoffer <dhoffer6@gmail.com> wrote:
Thanks for the suggestions. Yes I too find that I have to delete gwtUnitCache on occasion so yes I had tried (several times) that thinking it would help but it didn't in this case. However I'm not sure about symbolMaps where are those located?Regarding the script vs. IDE build issue...I only use the Maven build because there are some issues building the app with the IDE so I don't even bother to try...our CI build system uses the Maven build so to be consistent that is what I use too. IDE is just to code/debug.-Dave--On Mon, Jan 13, 2014 at 8:20 AM, jonl <jonl@percsolutions.com> wrote:This could be as simple as the gwtUnitCache or the symbolMaps getting corrupted. Happens every now and then and a clean of the gwt-build environment is the only way to fix it. I delete my gwtUnitCache and the built war directories every time I build from scropt to prevent this kind of thing. If running a script build and running hosted mode from the same base, it also best to make sure that your script builds to a directory that your IDE does not. Otherwise their could be cross contamination of compilations creating incompatibilities in the compiled version.
On Thursday, January 9, 2014 9:03:40 AM UTC-7, dhoffer wrote:I was finally able to get this working in hosted mode again but I'm not exactly sure why. All the evidence points to a bug in IntelliJ as the fix involved deleting the IntelliJ project files and rebuilding from the Maven pom files and messing with the JDK version both specified in the Maven pom files and in IntelliJ.I've seen cases before where IntelliJ gets confused by the Maven project and just looses dependencies, but that did not seem to be occurring in this case. Also IntelliJ does not handle well cases where, in a multi-module build, modules use more than one JDK version. And that is my case due to GWT not supporting JDK7 yet.That being said...it's possible that I don't have the JDK version specified properly in my Maven pom files. I'd like to know how best to configure the JDK in the Maven build when using GWT. Here is my use case:I have a multi-module build where my runtime JDK has to be 7.0. In addition I have lots of dependencies that were built with JDK7 so I have to use that as my main compiler for my build. In my maven project I have one child folder that handles all the GWT parts of the build. That GWT parent folder has the following 3 modules:myapp-gwt-api- Module that contains shared code between myapp-gwt-dev & both the client and server portion of myapp-gwt-war- This module is of type pom but it generates a jar. I presume this was made a pom type to give full control over what goes in the jar, the build is configured to compile and then include both the classes and the java source in the jar. However in this build the JDK version is not specified in the maven-compiler-plugin configuration...so I guess it uses some default? In retrospect it seems the classes could use JDK7 as that is what all the server side code uses but the java source has to be JDK6 compatible else the GWT compiler won't be able to use the source.myapp-gwt-dev- Module that contains GWT rebind code. Our project makes heavy use of GWT's rebind code generation feature so all the code that is needed to rebind/generate code is in this module.- This module has a dependency on myapp-gwt-api- This module is of type pom but generates a jar. This module appears to be just like the previous one...it generates a jar with both classes and source files.- Also this module gets the GWT compiler classes from the gwt-dev jar and puts them in this module. I presume this is so that in the next module GWT has all that it needs to perform the GWT rebind operation without having to add a dependency on gwt-dev in the war module. Also it would serve as a way to keep the rebind code out of the war...as that is not needed at runtime.myapp-gwt-war- This is the main GWT module and is of type war.- It has a dependency on myapp-gwt-api and on myapp-gwt-dev however in the later case it has provided scope to stop it from going into the wars runtime dependencies.- This module uses gwt-maven-plugin to compile the GWT application, however the JDK version is not specified so I assume that uses a GWT default?- In this module, in the maven-compiler-plugin, we do specify the JDK version, it's set to 1.6 for both source & target. I'm not clear what this should be. Ideally we would want the source & target to be 1.7 for the server side code. However the client side source has to be 1.6 for GWT. And does this setting affect what compiler is used by the gwt-maven-plugin, or is that completely separate?Now that I get to the end of analysis of the Maven build I see that that the maven-compiler-plugin is configured in the pluginManagement section to use JDK 1.7 for both source & target. So I assume that where I said above the compiler version was not specified...it would use 1.7 as the defaults.In retrospect it seems that for both myapp-gwt-api & myapp-gwt-dev we should use 1.6 for the source and 1.7 for the target in the maven-compiler-plugin config? I'm not sure about in myapp-gwt-war...maybe the same.I'd really appreciate feedback on how best to configure this.-Dave
On Wednesday, January 8, 2014 1:39:41 PM UTC-7, dhoffer wrote:I have a large GWT application using 2.5.1 and all of a sudden I am getting the following error when run/debug in GWT hosted mode:com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
This happens in the GWTBridgeImpl#create(Class<?> requestedClass) method. After the exception it builds a RuntimeException with the following error message: Deferred binding failed for 'com.google.gwt.user.client.rpc.XsrfTokenService' (did you forget to inherit a required module?)My build is maven 3.x and I'm using IntelliJ to run in hosted mode. This worked fine up until a couple days ago and I don't know what has changed that might cause this. I've never seen this error/problem before. XsrfTokenService is part of GWT so I don't know why it would be having any trouble finding/loading that.Does anyone have any suggestions as to what might be the cause?--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/6kpt84M92aU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/6kpt84M92aU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment