Firing native events in GWT can be real pain. If you need to fire click event when user press ENTER (or any other key that you want to work like CLICK) on any custom made element Read more
Tag: gwt
GWT Development Plugin Firefox 15 (FF15) on 64bit ubuntu
GWT/GXT Unable to get value of property ‘user.agent’
If your app hangs in IE/IE8 during load and you have
Unable to get value of property 'user.agent'
error under Development Mode, you should instruct your IE how to interpret application's page. To do this, put
<metahttp-equiv="X-UA-Compatible"content="IE=8">in your index.jsp or whatever you use to render the app. More information on GWT wiki page.
GWT has bug in Dev mode for Chrome
It happens when trying to check visibility of component. So be careful with
component.isVisible()
as it fails on Chrome.
Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT's isVisible()
(UncaughtExceptionHandler.java:23) 2012-07-30 12:55:02,147 [ERROR] java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.dom.client.Element
java.lang.ClassCastException:
java.lang.String cannot be cast to com.google.gwt.dom.client.Element
at com.google.gwt.dom.client.DOMImpl.getParentElement(DOMImpl.java)
at com.google.gwt.dom.client.Node$.getParentElement$(Node.java:184)
at com.google.gwt.user.client.DOM.getParent(DOM.java:892)
at com.extjs.gxt.ui.client.core.El.getParent(El.java:1274)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1889)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1874)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1898)
at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:767)
at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:754)
at pl.touk.mnp.frontend.webapp.client.widgets.RichDateComboFilter.handleBeforeLoadEvent(RichDateComboFilter.java:258)
component.isVisible()
as it fails on Chrome.
Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT's isVisible()
(UncaughtExceptionHandler.java:23) 2012-07-30 12:55:02,147 [ERROR] java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.dom.client.Element
java.lang.ClassCastException:
java.lang.String cannot be cast to com.google.gwt.dom.client.Element
at com.google.gwt.dom.client.DOMImpl.getParentElement(DOMImpl.java)
at com.google.gwt.dom.client.Node$.getParentElement$(Node.java:184)
at com.google.gwt.user.client.DOM.getParent(DOM.java:892)
at com.extjs.gxt.ui.client.core.El.getParent(El.java:1274)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1889)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1874)
at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1898)
at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:767)
at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:754)
at pl.touk.mnp.frontend.webapp.client.widgets.RichDateComboFilter.handleBeforeLoadEvent(RichDateComboFilter.java:258)
When using development mode, better use Firefox. In production Chrome works well without bugs.
EDIT:
When using shallow visibility checking
component.isVisible(false);
the error can be avoided. GWT isn't traversing through DOM tree and it doesn't blow with an exception but you have to check whether shallow visibility checking is sufficient (in most cases it is).
EDIT:
When using shallow visibility checking
component.isVisible(false);
the error can be avoided. GWT isn't traversing through DOM tree and it doesn't blow with an exception but you have to check whether shallow visibility checking is sufficient (in most cases it is).
New Firefox 14 ruined all my GWT work (Ubuntu 12.04)
That's because there's no GWT Development Mode plugin for Firefox 14. And now I can't work!
Wait! There's a solution. Instead of fighting with ubuntu with reversing installed Firefox to 13. I can have parallel versions of FF.
So how to install previous version of Firefox on ubuntu?
Go there
http://mirror.dacentec.com/mozilla/firefox/releases/
and download your binary. Be cautious with 32 and 64 version. If you don't know what version do you have, call
uname -m
and it'll tell you.
Then unpack your version to desired directory (other than current Firefox's dir).
Close any running Firefox instances and run your downloaded version. Beware of upgrading both firefox and any plugins. Don't do this. This copy should remain as is.
If you're looking for unofficial GWT Development Plugin versions (for FF12, FF13 and soon for FF14) you might looking at my gwt entries.
Wait! There's a solution. Instead of fighting with ubuntu with reversing installed Firefox to 13. I can have parallel versions of FF.
So how to install previous version of Firefox on ubuntu?
Go there
http://mirror.dacentec.com/mozilla/firefox/releases/
and download your binary. Be cautious with 32 and 64 version. If you don't know what version do you have, call
uname -m
and it'll tell you.
Then unpack your version to desired directory (other than current Firefox's dir).
Close any running Firefox instances and run your downloaded version. Beware of upgrading both firefox and any plugins. Don't do this. This copy should remain as is.
If you're looking for unofficial GWT Development Plugin versions (for FF12, FF13 and soon for FF14) you might looking at my gwt entries.
GWT – RPC serialization problem
Read moreType ‘some.type.you.are.sure.is.serializable’ was not included in the set of types which can be serialized by this SerializationPolicy. For security
GWT Developer’s Plugin for Firefox 13
I dug it from the net.
For Firefox 13
For Firefox 13
- running on all platforms(Mac OS, Windows, Linux 32/64): http://acleung.com/ff13-win.xpi
- running on Mac OS: http://acleung.com/ff13-mac.xpi
- running on 64 bit Linux: http://acleung.com/ff13-linux64.xpi
- running on 32 bit Linux: http://acleung.com/ff13-linux32.xpi
GWT Hosted mode on 64bit linux
GWT for linux is build against 32bit architecture. It contains some SWT/GTK 32bit modules. So if you try to run it with 64bit java it fails
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/tools/sdk/gwt/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: /opt/tools/sdk/gwt/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:301)
Could not find the main class: com.google.gwt.dev.GWTShell. Program will exit.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
You have two choices. Find 64bit SWT/GTK modules with same build version (3235 in this case) - good luck! or download 32bit JRE.
I chose second option and it took me 3 mins to resolve the problem.
Find proper JRE version on Oracle site I suggest bin file instead rpm. It unpacks jre to own dir. Move that directory to some convenient location (it doesn't matter where). Edit gwt.properties and set java.executable to java exec located in 32bit JRE.
Now run your GWT hosted mode and be unstoppable developer!
You may have some warnings from GTK, such as
/usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so: wrong ELF class: ELFCLASS64
(GWT:351): Gtk-WARNING **: Failed to load type module: /usr/lib/gtk-2.0/2.10.0
/menuproxies/libappmenu.so
But it has no consequences for me, so far...
Some sources say that you should set an environment var:
export LIBXCB_ALLOW_SLOPPY_LOCK=1
to block bugs in X display layer but I don't know what does it mean :)
In this case I had to hadle with GWT version 1.5.3 (old corporate project)
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/tools/sdk/gwt/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: /opt/tools/sdk/gwt/gwt-linux-1.5.3/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:301)
Could not find the main class: com.google.gwt.dev.GWTShell. Program will exit.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
You have two choices. Find 64bit SWT/GTK modules with same build version (3235 in this case) - good luck! or download 32bit JRE.
I chose second option and it took me 3 mins to resolve the problem.
Find proper JRE version on Oracle site I suggest bin file instead rpm. It unpacks jre to own dir. Move that directory to some convenient location (it doesn't matter where). Edit gwt.properties and set java.executable to java exec located in 32bit JRE.
Now run your GWT hosted mode and be unstoppable developer!
You may have some warnings from GTK, such as
/usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so: wrong ELF class: ELFCLASS64
(GWT:351): Gtk-WARNING **: Failed to load type module: /usr/lib/gtk-2.0/2.10.0
/menuproxies/libappmenu.so
But it has no consequences for me, so far...
Some sources say that you should set an environment var:
export LIBXCB_ALLOW_SLOPPY_LOCK=1
to block bugs in X display layer but I don't know what does it mean :)
In this case I had to hadle with GWT version 1.5.3 (old corporate project)
Red Black Tree Visualization using HTML5 Canvas and GWT
I created a sample app, which demonstrates HTML5 Canvas usage from Java through GWT. I think GWT is a great tool for migrating desktop apps into Web nowadays, especially Read more
TouK on WGK 2011 – update
I National Conference on Computer Games Development in Gdańsk is officially over. Three days with polish game dev, technical lectures and challenging 8 hour game programming Read more