Integration of GWT 2.5 to GWT 2.4 - gwt

I am using GWT 2.4 with Hibernate 3.0. I wanted to know what changes I need to make in my application for integrating GWT 2.5 in my application ?

Nothing special.
Replace 2.4.0 dependencies with 2.5.0-rc1 ones (depending on how you manage dependencies, either download the SDK and drop the new JARs to replace the previous ones, or bump the version number in your POM –if using Maven– or similar build file).
If you're using Maven and the gwt-maven-plugin, make sure you re-define the plugin dependencies too (note gwt-maven-plugin 2.4.0 also needs gwt-servlet to be overridden); or you can test the gwt-maven-plugin 2.5.0-rc1.
Check the list of breaking changes though; chances are small that they affect you, but there's still a risk.

Related

Eclipse not recognizing the new jars when migrating from Play Framework 2.4.2 to 2.5.0

I've been trying to migrate from Play 2.4 to 2.5 by following the Migration Guide, and I've upgraded my sbt version to 0.13.11 and ensured that I'm using Scala 2.11. I believe I've been able to successfully migrate to 2.5 because I've changed my routes to fit the new default InjectedRoutesGenerator, but I can't seem to use the new play.libs.streams.Accumulator in a custom BodyParser I want to make.
Any ideas as to why I might not be able to reference Accumulator? If it helps, even when I clean, build, and refresh my project in Eclipse, the referenced jars stay as <jar_name>_2.11-2.4.2.jar.

GWT: Jetty version in dev mode

I have two questions:
1. Which Jetty version is used by GWT 2.5.1 in dev-mode?
2. Is there a way to change this version?
6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml)
Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106
Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use org.eclipse.jetty rather than org.mortbay.jetty as a root package so there shouldn't be any problem (with the old GWT pre-2.6).
FYI, gwt-dev will be split into several JARs in the next version of GWT (or maybe the one after that) and the dependency on Jetty will be moved to an optional JAR, and will possibly be updated as well. (note though that GWTTestCase also depends on Jetty)
EDIT: this finally happens with GWT 2.8, but Jetty is needed for SDM (CodeServer) and Jetty has a bad track of backwards compatibility.

GWT, Guice and GIN compilation

I'm trying to build and GWT MVP application using Guice and Gin. I added Guice and GIN jars to my Eclipse project but i'm stuck with this error:
java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions
I've done a quick Google search and here says the we need to recompile GIN against GWT SDK. Also, the Gin Tutorial mention something about a compilation step.
Isn't enough to add GIN jars to the GWT project, or is mandatory to generate gin.jar from sources? How do i accomplish this with Eclipse (with Google Plugin)?
PS: I'm not using Maven in my Project. Only Eclipse and Google Tools
Another PS: Currently using Guice 3.0, Gin 1.5 and GWT 2.3
If you are using GWT 2.2 or above try using a latest snapshot of gin 1.1 or higher versions and also upgrade guice 3.0.
For Gin 1.5 there is a pre-gwt-2.2 jar and a post-gwt-2.2 jar. Make sure you have the right one. And probably only one of them should be in the WEB-INF/lib. Make sure both gin and guice are in the lib and in Java Build Path->Libraries. I also have aopalliance.jar, guice-assistedinject-3.0.jar and javax.inject.jar. (Also guice-servlet but that isn't part of the problem here). Make sure you have " " in your .gwt.xml file.
And remember in dev mode that gin uses guice to do most of the work.

NetBeans + GWT 2.2.0 + Maven compile problem

I'm trying to create a Maven Web Application project with Google Web Toolkit in NetBeans 6.9. I've followed the steps shown on this video: http://www.youtube.com/watch?v=M-iVZ5TJ21w
After creating the project and adding GWT to the frameworks my project compiles and deploys to Tomcat nicely. Now i like to change the default GWT version from 2.0.3 to 2.2.0. As i edit the gwt.version property in the POM and save the file, NetBeans fetches the new gwt-user-2.2.0.jar file and the javadoc. However if i try to compile the project i get this Maven error in the console:
Downloading: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.2.0/gwt-dev-2.2.0-linux.jar
Unable to find resource 'com.google.gwt:gwt-dev:jar:linux:2.2.0' in repository central (http://repo1.maven.org/maven2)
If i point my browser to the URL http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.2.0/ i can see that there's truly no gwt-dev-2.2.0-linux.jar present. However i can see there a gwt-dev-2.2.0.jar which i think will be the correct one to use.
What should i do to fix this error?
You're probably using old version of gwt-maven-plugin. Switch to 2.2.0 or remove version declaration and it'll fetch newest version.
It's also possible that you have some old-format dependency for GWT in your pom. There used to be tag required for old GWT versions. If you have one you can remove tag and it will fetch system independent version without -linux suffix.

Unable to publish web app: SpringSource Tool Suite problem?

I have an existing, fully functional Spring web application based on Spring 2.5.6 - developed using SpringSource Tool Suite 2.1.0.SR1.
Because I'd like to use REST I decided to upgrade to Spring 3.0.0.M4. After editing the dependencies in pom.xml and changing my code to reflect the API changes in Spring 3.0 I tried to publish my web app to a local server (SpringSource tc - a Tomcat derivate).
The result is an almost empty web app folder and therefore a non-functional app. The app's folder only contains WEB-INF/lib with all libraries required by the Maven dependencies.
After realising that something's broken, I created a new Spring MVC project (based on the default 2.5.6) and published it to the same server. No problems. I tried to adapt my project's files (.settings/*, .project, .classpath, .springBeans), but this didn't change anything.
I'm pretty lost right now. My guess is that STS doesn't handle 3.0 apps correctly. Any suggestions?
PS: I don't want to revert to 2.5 if it's not absolutely necessary. I don't need STS and tc so I don't have a problem using other tools, but it worked fine so far.
I run into this all the time using Eclipse Galileo and m2eclipse 0.9.8 and Tomcat with WTP. I think it is m2eclipse that is the culprit. The problem seems worse after switching from Ganymede. The work around is to run mvn to create the war and then copy the war contents from "target" to WTP's "wtpwebapps" directory. You can conveniently find this horribly long path by double clicking the server in the Servers view, and choosing "Open Launch Configuration" from there click on Arguments(?) tab I think and copy the catalina.home java property that is defined as an argument there.
The problem vanished with newer versions of STS. Additionally my development environment changed a bit since I posted this question, so I can't really tell what caused the problem.
For me, it looked like a weird hiccup inside STS.
Spring Tool Suite 2.1.0 claims partial support for Spring 3.0, though not for the REST features. According to the release, future releases will add full support. From the release statement:
Features
Support for milestones of Spring 3.0 including XML editing and validation, support for #Configuration and #Bean annotations
Future
Complete Spring 3.0 support including tools for developing RESTful web applications
Try deploying your app to embedded jetty. 'mvn jetty:run' with help you confirm if that there's nothing wrong with your build (that all the right manifests and deps are in place)