gwt-unitCache Vaadin 7 - gwt

I have a project that, for some reason, has src/main/webapp/VAADIN/gwt-unitCache on my Mac, the older machine where I started the project. When I cloned the project to a newer machine and rebuilt my project ( mvn clean package ), it did not have this gwt-unitCache. Things seem to work fine. On the Mac, the folder has not been updated since last year ( July 2018 ). To be honest, I am not entirely sure my version of Vaadin ( 7.7.13 ) even needs this directory anymore. To be honest, I was late in changing to 7.7.13, so I could have done this change last year. Is it safe to remove?
Also, for a Vaadin 7 project, what generates it?

Yes, it is safe to remove the gwt-unitCache directory/folder. This is generated by the GWT compiler when running a GWT application in development mode (or SDM super development mode).

Related

Can't run java when trying to download Scala

I'm working with a Scala project and am trying to get IntelliJ to work with it. (If it makes a difference, I've gotten it to work before. But my machine died and had to be replaced, and this is the first time I've tried to use Scala since reinstalling IntelliJ on the new machine.) The machine is running Linux.
I've gotten the banner that says "No Scala SDK in module", and I selected "Setup Scala SDK"; Create; Download; Version 2.11.11; OK. But I get the message
Cannot run program "java" (in directory "/tmp/sbt-project"): error=2,
No such file or directory
Why is it looking in that directory (which does not exist on my machine)? It's possible there are some settings that got copied over from my previous machine. If so, where would I find and fix the setting?
How do I get past this problem?
Note: In a desperate attempt to work around the error, I created /tmp/sbt-project and symlinked the Java binaries into it. When I tried again, I got the same error except it said in directory "/tmp/sbt-project1". I tried creating /tmp/sbt-project1 as a symlink, and when I retried, it said in directory "/tmp/sbt-project2". What's going on?
In short: I have no idea why you and I both experienced this problem, but these steps remedied the situation for my particular case (no guarantees but maybe it will help you too)
Close Intellij
Likely in your home directory, backup and remove the .Idea* directory containing your personal settings
Open Intellij and at the welcome screen choose Do not import settings
Using the guided installation, ensure the "Featured" plugin, Scala, is installed
Reopen your project and when you setup the Scala SDK, miraculously a pre-existing version of Scala SDK should exist from the "Ivy" repository (I tested this on a fresh VM of Lubuntu)
After selecting the (likely outdated) Scala SDK, again go to Project Settings and under Global Libraries click the + symbol to add the latest Scala SDK.
Miraculously once again, you will see now both the SDK version from before and the latest version of Scala - choose that one and done!
Notes:
Before running those above steps, I tried the same things you did on the VM, possibly caching install versions I wasn't even aware of that later became available once I resetup Intellij.
The reason I suspect this worked is because I thought I would save myself time by copying the .Idea* directory from a different machine and using that - many paths were different! So likely I just disabled features with broken paths from my other machine
Even though I never needed to press the "Download" button, if I do I still get that same error! So I guess all this did was bypass manually downloading the SDK like you had to do...
My setup:
OS: Lubuntu-16.04.3-lts
Intellij Version:
IntelliJ IDEA 2018.1.4 (Community Edition)
Build #IC-181.5087.20, built on May 16, 2018
JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.13.0-43-generic
echo $PATH
/home/e/tools/jdk1.8.0_121/bin:/home/e/bin:/home/e/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
I met the same problem when installing Scala by IntelliJ.
You can choose to install Scala mannually.
For example, install Scala follow this tutorial: https://www.vultr.com/docs/how-to-install-scala-on-centos-7
Then use Browse when selecting Scala SDK. Choose your directory, e.g. /usr/share/scala/
You can use Scala in IntelliJ now.

last code changes not present in application server

Under Eclipse (with Maven and GWT), i have 4 projects.
I made modifications in my Java code source.
To put my modifications in the application server (a Jonas server), i made a clean / build automatically of all projects, then a GWT compile of the project who contains the entry point. and finally an export WAR of this project who contains the entry point.
When i put this WAR on the application server (Jonas), and stop and restart of the server,
my last changes are not present in the server !!!
However, when i run my GWT application in local (localhost:8080), my last changes are present.
Do you have met such a situation ? What can explain it ?
Thanks
If you made modifications to a sub-project, but did not increment the version number, it might be possible that you continue to use an outdated version.
It depends on what you mean by "i made a clean / build automatically of all projects, "
I recommand you update the version number of projects when upgrading, and/or build with -U argument (mvn clean install -U)

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.

Moving my GWT, GAE installation into my project for source control

I use the google plugin for eclipse with GWT and Appengine libraries. Every so often I upgrade one of the libraries, which currently involves:
I install the update somewhere on my HD
I add the update as an alternative SDK in eclipse, with a generic name
I update the project settings to point to the new generic name
I commit the changed settings files (which do NOT include the upgraded library) to our source control
The problem here are in unfortunate steps 5-7:
5 Everyone else's builds stop working past the change,
6 I go from machine to machine, repeating steps 1 and 2, and
7 I think for the nth time, "I should really find a way to automate this."
I'm here for the elusive step 8: Actually automating this. I want to include the SDK in my source control, so when I switch between versions or set up shop on a new machine, the relevant SDKs are automatically installed and downloaded. I don't want to have to configure eclipse settings at all. In my ideal situation, I am willing to install Eclipse and the GPE on each machine, but after that I just want to clone my repository and go.
I've tried doing this by removing the GWT library from my build settings, copying the entire GWT installation folder into the root of my project, and adding gwt-user.jar and gwt-dev.jar to the build path from there. This almost works, but eclipse complains that it can't find gwt-servlet.jar (even though it exists precisely where it claims to be looking for it!). There also seem to be other magical settings I don't understand.
Finally, the question: If this is the right track, what settings do I need to manually control? If this is the wrong track, what's the right one?
+1 good question. This may or may not answer your question, but I can share with you what I do. I also work with GAE and GWT.
I just include the SDK .tar/.zip files in my repository, remove the version numbers from the filename, and update it when I want to move to a new version. If that version migration fails, I can easily revert to the old SDKs. I also use GXT and a bunch of other GWT extensions, so my problem is even worse than yours. I don't use eclipse for GAE nor GWT, so I can't relate to the problems you are having there. If you don't want to have to configure eclipse every time, then don't use eclipse.
Disclaimer: I hate eclipse.

Incremental Publishing in Eclipse for Static Web Project

I have a static Web project added to an Apache server. Whenever I make a change to the project, regardless of how small the change is, the entire project republishes instead of the individual file. I was under the impression that the publishing process was supposed to keep a delta and only republish the files that have been marked as changed in the delta.
I wouldn't mind if the project were small, but it's a large project (200+ MB) and the connection to the server I'm publishing to is a bit slow. A republish takes anywhere between 15 minutes and a half hour.
Does anybody know if my install of Eclipse is working as expected?
Environment Specifics:
Eclipse Galileo
Aptana Studio Plug-in 1.5.1
Maybe you've found a bug. Try rsync instead.
There was a bug about delta publishing, but it should be fixed by now. And from other Eclipse projects, I assume that they added a test case for this, so it shouldn't happen again. But maybe your circumstances trigger a new bug.
Are you manually changing the files or do you use some script outside of Eclipse? Anything that makes Eclipse think the whole project has changed, will trigger a full redeploy.