June 2009 Archives

NEW NGELEPEN, JAVA, INDONESIA - MAY 31:  A gir...

Image by Getty Images via Daylife

After learning about gwt plugin for eclipse, i decided to give it a try. Unfortunately, running hello world in itself became a learning curve.

Eclipse provides nice interface to install the plugins. It did not complain in installing gwt and app engine SDK's and other binaries. Hello world project was created with no issues. Till here was cake walk. Moment i started compiling, jvm threw up lots of backtraces.

Compiling module com.jatspeak.gwt.first.Firstcut
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb73ad7c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb73ad891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0x8a653494]
#3 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b76edce]
#4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b758d77]
#5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b758ef3]
#6 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0x8b759136]
#7 [0xb13bf008]
#8 [0xb13b8b6b]
#9 [0xb13b8b6b]
#10 [0xb13b6236]
#11 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb764beec]
#12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb781bae8]
#13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb764bd1f]
#14 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d) [0xb76a982d]
#15 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb735530d]
#16 [0xb13be898]
#17 [0xb13b8a94]
#18 [0xb13b6236]
#19 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb764beec]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb73ad7c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb73ad96e]
#2 /usr/lib/libX11.so.6 [0x8a652619]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x8a648666]
#4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b7580b9]
#5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b758303]
#6 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so [0x8b758fa1]
#7 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0x8b759136]
#8 [0xb13bf008]
#9 [0xb13b8b6b]
#10 [0xb13b8b6b]
#11 [0xb13b6236]
#12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb764beec]
#13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb781bae8]
#14 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so [0xb764bd1f]
#15 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d) [0xb76a982d]
#16 /usr/lib/jvm/java-1.5.0-sun-1.5.0.16/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb735530d]
#17 [0xb13be898]
#18 [0xb13b8a94]
#19 [0xb13b6236]
Solution :- You need to run awt in headless mode. Upon googling some folks prescribed that you better "sed" the .so file, but that is not required. Putting a VM argument -Djava.awt.headless=true will serve the purpose as well. Many times the programs like servlets etc may not know how to connect to a DISPLAY in windowing system. Thus headless will enable them to connect without a display

Thus, headless compiles the gwt project.

Movin forward, while running the project, again lots of linkages were found absent. Fortunately, the error mentions that that listdc++5.so cannot be opened.

Solution :-
Ubuntu(8.10) ships with a mroe recent version of this library, so you will need to install the 5th version by sudo apt-get install libstdc++5

Conclusion :- In case your configuration has these two attributes
  1. Java 1.5
  2. Ubuntu Intrepid (8.10)
You may need to perform above two step in order to say Hello!
Reblog this post [with Zemanta]

About this Archive

This page is an archive of entries from June 2009 listed from newest to oldest.

February 2009 is the previous archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.23-en