com.google.gwt.dev.Compiler Wont Start when compiling large GWT project - gwt

I have a fairly large GWT project with compile output Javascript of 3.5MB when it does compile. The project is not modularized and does not use RunAsync. As of Thursday 8/9/2013 my project was compiling just fine in all the development environments (as well as on build servers) for all my developers. But starting Friday (8/9/13) none of these environment will compile. The java sources compile just fine but the build just stops just as it tries to run the com.google.gwt.dev.Compiler.
Some facts:
1. GWT Versions (I have projects that are on 2.3 and 2.5 and all wont compile any more)
2. There are no significant size changes from the day before when the projects compile fine without any problems
3. Compiles are not working for even for single browser (USER-AGENT) and single locale
4. Smaller GWT projects -- including new projects created just to test compiling; work just fine and compile OK
5. I have tried on both 64bit and 32bit platforms with RAM in excess of 12GB on dev boxes
6. All dev environments and build servers are windows based
Any ideas on what has changed and what I can do to make com.google.gwt.dev.Compiler fire again for these projects.
I am most disturbed by the almost synchronized-like in which all dev environments stopped working on the same day with not as much as a change in a single line of code in some of the projects.
Thanks in advance for your help.

Related

Load, compile and run Eclipse project with a bash file

Given an hypothetical Eclipse project located in :
C:\user\john.doe\workspace\myProject
Is it possible with a simple bash script (or else) to:
Open Eclipse
Compile the project
Run the project
Possibly do this for multiple projects at the same time
with a simple click?
I'm working on an application and I currently have several modules all with their own suit of unit tests in a separate project. I would like to make it as effortless as possible to run every single test benches when changes are made by me and others so the code doesn't rot because it takes too much time to run the 10+ test projects.
I'm using Eclipse Kepler on Windows 7 for C projects.

Netbeans & JavaFX - Clean and build on each run?

I recently started working with JavaFX at the Netbeans IDE. I come along with the Hello World examples as it is not that complicated, but there is one big thing that is totally annoying me:
As within my FXML project, I have to Clean & Build the whole project before changes get applied.
Is this normal?
May I skip this?
Working on my Lenovo Yoga, Clean & Build & Run takes more than a minute! That's way to long for one single changed character.
I'm using:
Netbeans version: 7.2.1
Project type: JavaFX FXML
JDK: 7
Also, I can't select the Properties -> Build -> Compile -> Compile on Save checkbox.
Netbeans 7.2.1 does not support Compile on Save for JavaFX projects, so you have to manually recompile the project each time.
One alternative is to create a normal Java project, import the JavaFX JAR (jfxrt.jar IIRC). Compile on Save will be available and you won't have to recompile the whole project every time you make a change (although you should still run a "clean and build" before releasing your project).
When doing that, you might lose a few JavaFx-related features - not completely sure.

GWT compile crashes JVM

I am trying to compile a relatively simple, client-side-only GWT 2.5.0 application under JDK 7u7.
The project runs perfectly fine in development mode. I also remember it was compiling ok on another machine a while ago. (It had GWT 2.4 and some JDK 7, and I transfered my project to GWT 2.5 by creating brand new GWT project on new machine, and copying the old sources to the new src dir. I am sure everything went fine on this stage, as "development mode" runs ok, even after cleaning project/cache).
GWT Eclipse plugin is latest (installed from update site for my Indigo, yesterday).
I was trying with/without "-localWorkers 2", and also with different memory settings ("-Xmx512m", "-Xmx2048m"). I was trying different output styles (obfuscated, detailed) and different log levels (like it could change anything :)). I even tried "-draftCompile" - no success.
Anyway, in every case, the compilation stops after a few seconds with JVM crash report, on C functions like memcpy (!) or some JVM internal functions.
JVM trace file: http://pastebin.com/KzTrQqw7
GWT log on debug level: http://pastebin.com/yQZHi4Am
Any ideas why this could be happening to me?
Ok, it turns out that you can compile GWT with JDK7 only sometimes (I even tried creating a new, empty, sample project, the "GreetingService" one - it was crashing as well on my configuration).
But with JDK6 it goes nice, credits to Anders R. Bystrup.
I haven't used JDK 7, but I typically increase the JVM stack size to 4M
-Xss4M

GWT compile hangs

I created a Google Web Toolkit project in Eclipse (Indigo, GWT 2.4, Linux Ubuntu), made some changes (mainly, renamed the default module and added a new module), then clicked "GWT Compile", and then nothing happened - the compilation just hanged forever. There is no output; the progress bar at the bottom right shows "0%".
When I use "loglevel=all", I get a single line of output "Checking for updates" and then it hangs.
I tried deleting the cache - no change.
I tried creating a new project and copying the source files - no change.
With the help of this link: http://comments.gmane.org/gmane.org.google.gwt/70561 I added "-XdisableUpdateCheck" to the compiler; now the compile completes, but, when I try to run in development mode ("Run as -> Web application") it says "Development mode is loading..." and hangs.
I don't know even how to start debugging this. Please give me some hint!
I faced the similar issue. Here is my sequence of events for it:
Checked out the GWT project from the SVN --> tried to Google-GWT Compile --> gave entry point modules --> my log level was info and output style Obfoscated -->Hit compile.. Nothing happens except the progress bar stuck at 0%.
Tried to google and find out the solution in multiple ways but couldn't get the proper answer.
One trick worked --> I deleted the project from the eclipse workspace and re-imported it from the disk as an existing project. GWT compile worked this time. :)
Why it worked? --> When we delete the project from eclipse workspace all the libraries associated with that project get unbound and removed from the classpath. When you again import the same project and try to compile GWT before adding the required libraries to the classpath it will works. The real conflict is with GWT libraries and JBoss 5.0 libraries. There looks like some plain bug in GWT2.4 which they need to resolve. In the classpath if you precede the jboss and Web App libraries prior to GWT library the compile gets stuck.
If you face the similar issue, remove jboss and web app libraries from the classpath and compile GWT module and then add those removed libraries sothat the JAva source from your project gets compiled. Good luck!
I was having the same problem after working through this tutorial: http://www.javacodegeeks.com/2010/12/securing-gwt-apps-with-spring-security.html
In the end it was a dodgy external JAR that I added to my build path (the spring-context one mentioned in the tutorial). I grabbed another copy of it and all is good now.
Here is the FIX for this one as we cannot continue with this whole business of taking the jBoss library in and out every time we need to compile GWT.
The problem is that com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
(JdtCompiler.java) is referring to CompilerOptions which, as fate would have it, is referencing to the implementation in jasper-jdt.jar (situated in jboss library) instead of gwt specific implementation. Get ride of this jasper-jdt.jar from jBoss library and you should be all set. Don't worry if you absolutely need any of the classes from jasper-jdt.jar; there are tons of alternative Jasper jars who can fulfill your need other than this one.
try this: right click->google->gwt compile->click advance (bottom) and
In the Additional compiler argument add this:
-XdisableUpdateCheck
Giving option -XdisableUpdateCheck to GWT Compiler solves the deadlock problem for me. Thanks for the hint.
Used GWT 2.5.0 with java :
$ java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
$ cat /etc/issue
Fedora release 18 (Spherical Cow)
Kernel \r on an \m (\l)
$ uname -a
Linux myhostname 3.9.4-200.fc18.x86_64 #1 SMP Fri May 24 20:10:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I could solve the problem by setting the optimization level (console Argument -optimize 8 to 8, which means optimize the code at most 8 times. Default is level 9 resulting in optimizing until nothing changes anymore. It seems there are a few cases where this results in an endless loop.
Also see this issue on GitHub:
https://github.com/gwtproject/gwt/issues/9452#issuecomment-259088434
Old question, but today a colleage of mine was just running into this issue, too. It turned out that he was using classes from client packages (both own classes and ...client.rpc.IsSerializable) within the shared package of his project.
As a result the GWT build froze at compiling permutation 0. I assume that it got trapped within an endless loop between compiling shared and client classes.
Removing all usages of client classes from shared classes helped.

Buckminster: running JUnit Plugin tests headless

I have a simple Hudons/Buckminster setup where Hudson checks out four Java plugin projects from SVN, materializes(?) the org.eclipse.platform from the Helios download-site, runs a small ant-job in one of the projects for JFlex etc. (Buckminster doesn't "see" the configure external ANT builder?, and then Buckminster builds the workspace.
The Java plugin projects also contain feature.xml files with the same ID as the plugin (we've been using an ant-based build-process so far).
I can successfully perform ...#site.p2 on the first two, but the third one fails for some reason (but this is not the question here).
Now, one of the projects has JUnit tests that I can run from Eclipse Indigo using a headless JUnit Plugin Launch configuration. Note: for some reason, (because we have the features not in separate feature projects?), dependency generation checking on the launch config is broken, and I have manually configured the minimal set of plugins required.
Now, I run this launch configuration in Buckminster:
junit -l com.pon.ent/junit.launch
and get:
ERROR: Plugin validation errors were detected:
{com.pon.ent_0.0.0.qualifier=[Lorg.eclipse.osgi.service.resolver.ResolverError;#c986d2, org.eclipse.ui.views_3.5.1.M20110202-0800=[Ljava.lang.Object;#b27cca,
org.eclipse.ltk.core.refactoring_3.5.100.v20100526-0800=[Ljava.lang.Object;#1ec391,
org.eclipse.ui.navigator.resources_3.4.201.M20100707-0800=[Ljava.lang.Object;#1b9a026,
org.eclipse.debug.ui_3.6.1.v20100901_r361=[Ljava.lang.Object;#1c126da,
org.eclipse.ui.ide_3.6.1.M20100825-0800=[Ljava.lang.Object;#1dde560,
org.eclipse.team.ui_3.5.101.R36x_v20100825-0800=[Ljava.lang.Object;#fe10f1,
org.eclipse.ui.ide_3.6.2.M20101201-0800=[Ljava.lang.Object;#a68c8,
org.eclipse.jdt.ui_3.6.1.r361_v20100825-0800=[Ljava.lang.Object;#16535fa,
org.eclipse.debug.ui_3.6.3.v20101201_r362=[Ljava.lang.Object;#1baec4c,
org.eclipse.ui.navigator.resources_3.4.202.M20101124-0800=[Ljava.lang.Object;#ef965e,
org.eclipse.jdt.debug.ui_3.5.0.v20100602-0830=[Ljava.lang.Object;#17916a0,
org.eclipse.jdt.debug.ui_3.5.2.v20100928a_r362=[Ljava.lang.Object;#bc7bc0,
org.eclipse.equinox.p2.repository_2.0.2.R36x_v20110111-1500=[Lorg.eclipse.osgi.service.resolver.ResolverError;#607cad,
org.eclipse.compare_3.5.100.I20100526-0800=[Ljava.lang.Object;#997c85,
org.eclipse.ui.views_3.5.0.I20100527-0800=[Ljava.lang.Object;#be0e6e,
org.eclipse.ui_3.6.1.M20100826-1330=[Ljava.lang.Object;#1a5688d,
org.eclipse.team.ui_3.5.102.R36x_v20110203-1036=[Ljava.lang.Object;#73102f,
org.eclipse.jdt.ui_3.6.2.r362_v20110203=[Ljava.lang.Object;#2baa00,
org.eclipse.equinox.p2.metadata.repository_1.1.0.v20100513=[Lorg.eclipse.osgi.service.resolver.ResolverError;#a5f472, org.eclipse.ltk.core.refactoring_3.5.101.r362_v20101117-0800=[Ljava.lang.Object;#153a539,
org.eclipse.swt_3.6.1.v3655c=[Ljava.lang.Object;#8445f7,
org.eclipse.ui_3.6.2.M20110203-1100=[Ljava.lang.Object;#d8573,
org.eclipse.ui.workbench_3.6.1.M20100826-1330=[Ljava.lang.Object;#1b4776a,
org.eclipse.compare_3.5.101.R36x_v20100929-0800=[Ljava.lang.Object;#10bdf62,
org.eclipse.swt_3.6.2.v3659c=[Ljava.lang.Object;#76b51c,
org.eclipse.ui.workbench_3.6.2.M20110210-1200=[Ljava.lang.Object;#16c6a89}
WARN: Process /usr/jdk/instances/jdk1.6.0/bin/java (Oct 19, 2011 9:02:53 PM) terminated with exit status 1.
Given that things like org.eclipse.ui.views show up as matched, e.g.
org.eclipse.ui.views:osgi.bundle/[3.5.1.M20110202-0800,3.5.1.M20110202-0800]:
Found match org.eclipse.ui.views:osgi.bundle$3.5.1.M20110202-0800
I'm a bit at a loss what is actually missing/going wrong. I am not using any products are target platforms, other from what I get from the cquery which gets org.eclipse.platform, and the dependency resolution from my plugins.
Any interpretation is appreciated!
Update:
I've switched things a bit and now use Indigo, include org.eclipse.rcp in Buckminster's target platform, and switched the JUnit launch from plugins to features, and things have condensed down do:
Waiting for jobs to end
junit '-l' 'eu.hatsproject.absplugin/junit.launch' '-o' 'eu.hatsproject.absplugin/junit.xml' '--maxTimeAwaitJunitReport' '20'
WARN: Process /usr/jdk/instances/jdk1.6.0/bin/java (Oct 21, 2011 6:04:32 PM) terminated with exit status 1.
Doing full workspace refresh
Lessons learned:
don't mix-and-match: run Buckminster 3.7 imports with Indigo, not Helios update-site (inconclusive, maybe I did something else wrong as well)
put --stderr --stdout into the Buckminster junit invocation!
The problem was that the launch configuration contained platform-specific -X-switches, since I exported it from MacOS and was running it on Solaris. I have no idea where those messages end up when you don't use the above switches.