GWT 2.6 with GXT-3.0.1 error in compile - gwt

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.

Related

"Cannot be resolved to a type" after upgrading to GWT 2.7. and trying to compile a multi-project module

I´ve been having trouble getting the Super-Dev-Mode to work with GWT 2.7. and GXT 3.1.x The classical Dev-Mode starts without trouble, but the Super-Dev-Mode and GWT-compile the project won`t work.
I am currently working with Eclipse 4.4.2 with Java 1.7_2 on Windows.
So let´s pretend we have 2 GWT/GXT projects (no Maven) with GWT 2.6 and GXT 3.1.x (Projects are backuped on a repository).
One is called A and the other project is called B. Project A has many packages and no entrypoint (to just work as a library/framework), just an abstract entrypoint every other project has to extend. The other one is called B and inherits from A, the entrypoint extends the entrypoint of A.
When starting the project under GWT 2.6 in classical Dev-Mode the project works fine. When upgrading to GWT 2.7. it will work fine with the classical Dev-Mode, an even in Super-Dev-Mode the Codeserver starts to run, but when compiling the module i get an error that some code seems not to live under a package 'client' so i migrated it into a own package and added the sourcepath to the A.gwt.xml.
After fixing this error and starting the Super-Dev-Mode again (and when trying to GWT-compile) I get errors like this:
Ignored 15 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Finding entry point classes
Tracing compile failure path for type 'com.example.b.client.B'
[ERROR] Errors in 'file:/C:/Workspace/ProjectB/src/com/example/b/client/B.java'
[ERROR] com.example.a.client.A cannot be resolved to a type
[ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/view/ExampleLayout.java'
[ERROR] com.example.a.view.ILayout cannot be resolved to a type
[ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/client/service/ExampleServiceAsync.java'
[ERROR] com.example.a.model.Examplemodel cannot be resolved to a type
[ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/model/OtherExampleModel.java'
[ERROR] com.example.a.hibernate.model.ComOtherExampleModel cannot be resolved to a type
[ERROR] Errors in 'file:/C:/Workspace/ProjectB/src/com/example/b/client/service/OtherExampleServiceAsync.java'
[ERROR] com.example.a.model.NewExampleModel cannot be resolved to a type
...
(and many more)
Project A is included in the buildpath of the project B, when creating a custom run configuration where the project is added to "user entries" and adding source folders to "user" entries wont work. For the custom run configuration i used something like the following arguments:
"-src src/ -src ${workspace_loc:ProjectA} com.example.b.B"
And even:
"-src src/ -src ${workspace_loc:ProjectA} com.example.b.B com.example.a.A"
I widely searched for solutions and even tried to set up the workspace again, checkout the projects from the repository again, organize imports and even adding every package to the buildpath of A.
I also tried to add this to the .gwt.xml files didn´t work:
<add-linker name="xsiframe"/>
How can I solve the "cannot be resolved to a type" error?
I would really appreciate every form of help to get this problem done! Thanks!
One possible problem could be your version of GXT. If you are using GXT 3.1.1 (which was the latest GPL-release), then you can not use GWT 2.7.0.
Take a look at the version table:
GXT versions
As you can see, Sencha GXT 3.1.1 does not support GWT 2.7.0. The first GXT release which will support GWT 2.7.0 is GXT 3.1.2.

libGDX on SBT: roboVM backend is referencing the wrong ASM version

When trying to compile my Game with roboVM, I keep getting the error:
java.lang.IncompatibleClassChangeError: class org.robovm.compiler.plugin.objc.ObjCProtocolProxyPlugin$1 has interface org.objectweb.asm.ClassVisitor as super class
I have investigated some many hours, coming to the conclusion that it has to do with the ASM library: In the library ASM, up to version 3.3.2, the class ClassVisitor was an interface. It got promoted to an abstract class in 4.0 and the robovm backend bytecode uses a >= 4.0 version while my SBT builder tries to use a version < 4.0.
The roboVM code in question can be found here: https://github.com/robovm/robovm/blob/master/compiler/src/main/java/org/robovm/compiler/plugin/objc/ObjCProtocolProxyPlugin.java#L145
Now, while I realize that this is the issue, I have no idea how to fix / work around it. I do not want to compile libGDX from source...
To setup my app I used existing templates, namely this one: https://github.com/ajhager/libgdx-sbt-project.g8. Also, I use the latest versions respectively:
sbt 0.13.5
libGDX 1.4.1
scala 2.11.3
roboVM 1.0.0-alpha-04
Now when I investigated further, searching for the culprit in this conglomerate, I found that indeed two 'asm's were included in the classpath, the one with version 3.3.1 being mentioned earlier:
scalac -classpath ...:~/.ivy2/cache/asm/asm-all/jars/asm-all-3.3.1.jar:...:~/.ivy2/cache/org.ow2.asm/asm-all/jars/asm-all-4.2.jar:...
This obviously caused the crash. Now I only had to find the place where 3.3.1 was set as dependency and I was rather quick in finding it, at long last: pfn/android-sdk-plugin. For whatever reason, they set this as a dependency (albeit somehow not using it in their code). There were evidently no conflicts since the group ids differed: asm:asm-all:3.3.1 vs org.ow2.asm-all:4.2.
This is easily the dumbest thing I have ever walked across and I'm grinding my teeth that it took so long and so much debugging to get behind it. Hmpf!
I fixed it by cloning the android-sdk-plugin repository and adjusting the ASM version / group id to 4.2. I then continued to sbt publish-local and increased the version number dependency in my project to fit the cloned SNAPSHOT version's.
I hope this will help anyone that stumbles across this behaviour.
So long,
Danyel.

Migrating GWT 1.7 to GWT 2.4

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

Can't make Ext GWT 3.0 run

I am having a problem running a Ext GWT 3.0 with GWT (version 2.4). I tried making a Web Application Project from plugin but the I get this error:
[ERROR] Unable to find 'com/extjs/gxt/ui/GXT.gwt.xml' on your classpath;
When I change the gxt.jar to lower version: gxt-2.2.5 the demo application runs.
Anyone have experience the same issue?
The module name changed from 2.2 to 3.0. Instead of inheriting the com.extjs.gxt.ui.GXT module, inherit com.sencha.gxt.ui.GXT in your module file.
<inherits name="com.sencha.gxt.ui.GXT" />
This packaging has changed, along with the packaging of all of the classes, allowing you to have both jars on the classpath at once, and even inherited at once. This was done in part because of the large number of changes from 2.2 to 3.0.

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.