GWT has bug in Dev mode for Chrome

It happens when trying to check visibility of component. So be careful with
as it fails on Chrome.

Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT's isVisible()

( 2012-07-30 12:55:02,147 [ERROR] java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.String cannot be cast to
    at com.extjs.gxt.ui.client.core.El.getParent(
    at com.extjs.gxt.ui.client.core.El.isVisible(
    at com.extjs.gxt.ui.client.core.El.isVisible(
    at com.extjs.gxt.ui.client.core.El.isVisible(
    at com.extjs.gxt.ui.client.widget.Component.isVisible(
    at com.extjs.gxt.ui.client.widget.Component.isVisible(
    at pl.touk.mnp.frontend.webapp.client.widgets.RichDateComboFilter.handleBeforeLoadEvent(

When using development mode, better use Firefox. In production Chrome works well without bugs.

When using shallow visibility checking
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

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.

How to set gnome-terminal tab title. Permanently…

I've been looking for this a few times without success. There are some nasty proposals with setting PS1 variable or other tricks with .bashrc mods. Weak and doesn't actually work.
I needed a way to make a bash script that opens several tabs with fixed titles and with fixed start directories and with already started programs (for example tail/less of log files). Or solutions are very complicated.

There's a simple way.

There's a nice option for gnome-terminal -t "Tab title" which allows you to set a title for a tab. But in default profile (a switchable terminal behavior configuration) any program or bash prompt can change tab's title. So actually setting tab title doesn't work permanently.

A good solution is to create a new profile (let's call it "NoTitleChange") with options set to not to allow tab change. To do this, in gnome-terminal go to Edit->profiles... click New, apply new name. Then in tab Title and Command from drop box (When commands set own title...) choose Keep initial title.

Now you can invoke

gnome-terminal --tab-with-profile=NoTitileChange -t "My Permanent title"

and nothing will change the tab's title.

You can play with these and other options to create many tabs in one window.

gnome-terminal --tab-with-profile=NoTitleChange -t "PERMANENT" --tab-with-profile=NoTitleChange -t "TABS ARE"  --tab-with-profile=NoTitleChange -t "AWESOME"

I'm using these other options
-e, --command=STRING
                 Execute the argument to this option inside the terminal.

                 Set the terminal's working directory to DIRNAME.

                 X geometry specification (see "X" man page), can be specified once per window to be opened.

For example

gnome-terminal --tab-with-profile=NoTitleChange -t "src" --working-directory=/opt/workspace/play/mnp/repo/console_gxt2/mnpc  --tab-with-profile=NoTitleChange -t "DevMode" --working-directory=/opt/workspace/play/mnp/repo/console_gxt2/mnpc --command="mvn initialize exec:exec -Pdevel"

Now you can create start script that opens proper working dirs (with source code for example) and with server logs open. And you're ready to go!

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/ /opt/tools/sdk/gwt/gwt-linux-1.5.3/ wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(
    at java.lang.ClassLoader.loadLibrary(
    at java.lang.Runtime.load0(
    at java.lang.System.load(
    at org.eclipse.swt.internal.Library.loadLibrary(
    at org.eclipse.swt.internal.gtk.OS.<clinit>(
    at org.eclipse.swt.internal.Converter.wcsToMbcs(
    at org.eclipse.swt.internal.Converter.wcsToMbcs(
    at org.eclipse.swt.widgets.Display.<clinit>(
Could not find the main class:  Program will exit.
[INFO] ------------------------------------------------------------------------

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 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/ wrong ELF class: ELFCLASS64
(GWT:351): Gtk-WARNING **: Failed to load type module: /usr/lib/gtk-2.0/2.10.0

But it has no consequences for me, so far...

Some sources say that you should set an environment var:


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)