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
Related
jdk-11, Eclipse Photon 18-9, windows 7, Error free Application ported from java 6 until java 8. Just trying how far jdk-11 is usable with Eclipse.
JAVA_HOME points to jdk-11. Eclipse starts! But then things go strange. It’s possible to set the Java Build Path to jdk-11. But even if forced to be under Classpath the jre changes self to Modulepath!
The compiler compliance level can be set up to Java 10!
Under project Facets the highest Version of java which can be chosen is 9! If the compliance level of java is not reduced to 9, Java version mismatch is signaled!
Building with eclipse generates the mentioned false Error in 100 of cases!
However compiling with maven, source and target set to java 11, the package build terminates with success even if compiling for jee 8.
Who knows more about that? Anyway I’ll switch back to Java 8. Conclusion after a year of new Java versions coming out, it’s still not possible to use them! Very strange.
I just encountered this same issue, what i did to fix it was i just cut out that segment of code and pasted it back in and then it worked like it was supposed to. It can be caused by a small bug in the compiler. It stumped me for about an hour, but I got it! Otherwise, if you right click the project folder and go to properties, then compiler, you can change the compliance level to 11. this prevented the error from appearing a second time.
I was able to fix the issue by explicitly importing the hidden type:
import java.lang.Integer;
Note: before that I tried with
> Menu > Project > Clean
which seemed to work. That fix was only temporary however.
I had the same problem in Eclipse. However, the only thing that fixed it was changing the JRE from 10 to 11. So yes, it was a compatibility issue. I tried "Java.Lang.Integer" but like mentioned before, it was only temporary (which made NO sense to me since we are dealing with a type "String" lol).
Screenshot
Screenshot
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.
I'm sure we've all been there, I've got a JSF (Java) project on Eclipse that built fine yesterday, I call it quits for the night, turn off my computer and come back to it the next day only to find missing JAR errors, some of which are due to actual missing classes, others I can clearly find by navigating my build path. What's up with that? Is windows scheming against me and re-indexing files or something while I'm away?
So this might be IDE dependent on Eclipse Java EE Juno but on restart it created a copy of my src folder as a library which caused some Hibernate - duplicate mapping errors
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.
I created a new PlayN project from the 1.2 archetype using the command line given in the GettingStarted wiki page. I then imported this Maven Project into Eclipse, just bringing in the core, java, and html modules. If I right-click the Java project, I can choose my main class, and a window pops up with the background image shown. Note that I've done no real programming yet: I'm just using the default project configuration.
Next, I used GWT-compile through Eclipse on the HTML project, and I got no errors. When I run it as a Web application by using the provided URL (without removing the "?gwt.codesvr=127.0.0.1:9997" bit), the application runs fine aside the Eclipse Console gives a warning about being in Development Mode. (Specifically, "You are running in GWT Development Mode. For optimal performance you may want to use an alternative method.")
However, if I run the application the recommended way, by removing the gwt.codesvr parameter, then I keep getting a dialog box saying "GWT module 'testproject' may need to be (re)compiled."
After reading How do I run a maven/eclipse/GWT/playN app in production mode?, I tried doing mvn test -Ptest-html
and then pointing my browser at http://localhost:8080, but it gives the same error.
Am I doing something wrong?
(EDIT: I have no idea if this next point is significant or not, but I'll share it anyway. When I try to create a project from Eclipse, the newest PlayN archetype I can see is 1.0.3, even after telling Eclipse to update the Maven index. I'm running Eclipse Indigo.)
I guess you are running PlayN 1.0.3.
There is a bug in 1.0.3:
So you need to do the following:
Run GWT-Compile
Run the web application and get the error message: "GWT module 'testproject' may need to be (re)compiled."
Run again GWT-compile, while the Web-Application is running
Reload your browser with CTRL-F5
The important step is step 3.
Note:
You can update to PlayN 1.2 to get rid of the error. For this you have to change the file playn-showcase/pom.xml.
Change the line
<version>1.0.3</version>
to
<version>1.2</version>