Migrating GWT 1.7 to GWT 2.4 - gwt

I am trying to upgrade GWT from 1.7 to GWT 2.4 but I get build errors saying
Errors in 'jar:file:/C:/src/project/lib/gxt.jar!/com/extjs/gxt/ui/client/widget/Component.java'
[ERROR] Line 1280: Cannot reduce the visibility of the inherited method from Widget
Should I change the gxt version as well? I tried to change gxt to 2.2.5 and 2.2.6 but it doesn't work.

Yes, you do need to upgrade GXT. GXT 2.2.4+ should work. Check the release notes; they say GWT 2.3 support is introduced in GXT version 2.2.4.
http://dev.sencha.com/deploy/gxt-2.2.4/release_notes.html#Release_2.2.4
They also answer this in the forums.
http://www.sencha.com/forum/showthread.php?146796-GWT-2.4-compatibility

Related

error Rebind result 'com.googlecode.mgwt.ui.client.widget.animation.AnimatableDisplay' must be a class in mgwt 2.0 libary

I build application in gwt.
I use gwt 2.5.1 sdk and mgwtphonegap 2.4 libary and mgwt 1.1.2 libary
and now I decided to upgrade the gwt sdk to 2.7 and mgwtphonegap to 3.5 and mgwt to 2.0
and now I get error when I During Compilation.
the row that cause the error.
AnimatableDisplay display = GWT.create(AnimatableDisplay.class);
the error:
Rebind result 'com.googlecode.mgwt.ui.client.widget.animation.AnimatableDisplay' must be a class
how I can to resolve the problem
thank you everyone
From mgwt group
Animations changed on create PhoneDisplay:
//AnimatableDisplay display = GWT.create(AnimatableDisplay.class); //mgwt 1.2.
AnimationWidget display = new AnimationWidget(); //mgwt 2.0

GWT 2.6 with GXT-3.0.1 error in compile

since the 2.6.0 release of GWT which dropped support of ie6 browser my current project which also uses GXT is failing to compile with the following error:
Loading inherited module 'com.sencha.gxt.ui.GXT'
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] The value ie6 was not previously defined.
[ERROR] Line 96: Unexpected exception while processing element 'set-property'
i tried to set
<set-property name="gxt.user.agent" value="safari3, safari4, safari5, chrome, air, gecko1_8, gecko1_9"/> and the <extend-property name="user.agent" ....../>
but without any success. Are there any workarounds on this?
GWT 2.6.0 has several breaking changes over GWT 2.4.0 and 2.5.1 - these don't affect all libraries, but they do affect both GXT 2 and 3. Code changes in GWT 2.6.0 that break libraries like GXT include:
Changing permutations (ie6 and opera are gone, ie10 was added, note that newer versions of opera are webkit based and do not need their own permutation)
Element added new final methods hasClassName and toggleClassName that can't compiled with XElement methods of the same name
String utils methods removed, switched to newer version of Guava (which now uses those methods)
Saw an upvote, so I know this is still getting readers months later, so editing this to point out that GXT 3.1.0 is in maven central and supports GWT 2.6.0, 2.6.1, and as of Friday anyway, supports GWT 2.7.0-SNAPSHOT. I can't promise it is totally future-proof, but as long no public methods in GWT change, it isn't likely to break again in the GWT 2.7 series.

GWTEventService client failed to create listener

I am trying to run the hellogwteventservice shipped with the GWTEventService 2.1.0 and GWT 2.6. I imported the code into the eclipse so that I can run through Eclipse GWT plugin.
However on the Client module when following line called the exception is thrown and I get error stating failed initialized GWTServiceEvent.
theRemoteEventService.addListener(ServerGeneratedMessageEvent.SERVER_MESSAGE_DOMAIN,
new RemoteEventListener() {
public void apply(Event anEvent) {
}
});
Isn't the latest release of GWT 2.5 ?
In any case the latest release of GWTEventService is 2.1.0 as you mentioned. However this uses an older gwt-servlet-2.1 that is incompatable with the one gwt uses gwt-servlet-2.5. So you have 2 options:
1) Go back to GWT 2.1 (not recommened)
2) Build the latest version of GWTEventService as they have included GWT 2.5 support in the latest sources.
Note: adding the error thrown by your IDE might help to further specify the problem

GWT upgrade from 2.1 to 2.4

while compiling from GWT 2.1 to 2.4, the following error is shown:
Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
so kindly provide me with the solution to this issue.
There's a binary backwards-incompatibility in GWT 2.2 (where com.google.gwt.core.ext.typeinfo.JClassType et al. were changed from classes to interfaces). You have to update your third-party dependencies with ones that have been compiled against the GWT 2.2 SDK or a newer version; for your own library or if the third-party lib has been somewhat abandoned, you'll have to recompile it (javac).
GIN for example provides 2 builds of its 1.5 release: one compatible with GWT 2.1.1 and older, and one compatible with 2.2 onwards (there are two distinct JARs in the gwt-1.5.zip download).

Bug? GXT (Ext GWT) Compiles in 'devmode' target but not for 'build'

I'm working on a GXT project, and I'm using GXT UiBinder. I'm compiling with ant. The target devmode works fine with no errors, and I'm able to see my application running in the browser. But using the target build I get the following error:
[ERROR] Errors in 'jar:file:/home/webbtra/dev/rail_gxt/gxt-2.2.3/gxt.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java'
[ERROR] Internal compiler error
java.lang.IncompatibleClassChangeError: Found class com.google.gwt.core.ext.typeinfo.JClassType, but interface was expected
I'm using these versions, which I've read that they should be compatible:
GWT Version: 2.1.1 (also tried 2.2.0 and 2.0.4 with same result)
GXT Version: 2.2.3
Compilation will work if I remove <inherits name="com.jhickman.web.gwt.gxtuibinder.GxtUiBinder" /> from my module file, and use only GWT components. But again, it's strange that it works fine in devmode. Any help is appreciated.
-tjw
Figured it out. Even though GXT 2.2.3 claims to be compatible with GWT 2.2, it isn't. I reverted back to GXT 2.2.1 and GWT 2.0.4 and it works perfectly.
I just got the exact same error message you posted (even without using GxtUiBinder!), but I accidentally had set my GWT SDK to 2.1.1 (in Eclipse). I'm using "gxt-2.2.3-gwt22.jar", so this obviously cannot work.
Switching the GWT SDK to 2.2.0 solved the problem. So it seems, that GXT 2.2.3 + GWT 2.2.0 work together just fine.
If you'd like to try it again, make sure, that you don't just change the GWT library, but really switch the GWT SDK. (eg in Eclipse: Project > Properties > Google > Web Toolkit > Use specific SDK)
I'm managed to have them compiling together (gwt 2.2 + GXT 2.2.3) , but GWT Designer (Window Builder too) started throwing exceptions while parsing code. Without GXT - everything is fine. Becouse of Designer bug, i'm forced to downgrade GWT.