The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

u196598 (4) [Avatar] Offline
Hi All,

My machine crushed a few weeks ago and I lost my hard drive. So I reinstalled everything. I am using the latest GWT 1.4.60, MyEclipse 6.0 / Eclipse 3.3 IDE, Java JDK 1.4.2_05. I imported the project from the source zip file into my MyEclipse IDE and made all necessary changes, such as GWT jar and supporting jar paths. When running the project from my IDE by clicking Dashboard-shell.cmd, I can see everything. But when selecting Help / About, I got an exception:

[ERROR] Uncaught exception escaped
java.lang.RuntimeException: Deferred binding failed for 'org.gwtbook.client.ui.about.About' (did you forget to inherit a required module?)
at source for
at org.gwtbook.client.Dashboard$AboutCommand.execute(
at sun.reflect.NativeMethodAccessorImpl.invoke(
Caused by: java.lang.NoSuchMethodError: java.lang.Class.getSimpleName()Ljava/lang/String;
at org.gwtbook.rebind.DashboardCompositeGenerator.generate(

But I can run the example project without any problem using old GWT and MyEclipse.

My .classpath, .project, and Dashboard-shell.cmd are listed below:
<?xml version="1.0" encoding="UTF-8"?>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-httpclient-3.0.1.jar"/>
<classpathentry kind="lib" path="lib/commons-io-1.2.jar"/>
<classpathentry kind="lib" path="lib/gwt-widgets-0.1.3.jar"/>
<classpathentry kind="lib" path="lib/gwt-widgets-0.1.4.jar"/>
<classpathentry kind="lib" path="C:/bwi/gwt/gwt-windows-1.4.60/gwt-dev-windows.jar"/>
<classpathentry kind="lib" path="C:/bwi/gwt/gwt-windows-1.4.60/gwt-servlet.jar"/>
<classpathentry kind="lib" path="C:/bwi/gwt/gwt-windows-1.4.60/gwt-user.jar"/>
<classpathentry kind="lib" path="C:/bwi/gwt/gwt-windows-1.4.60/junit-3.8.1.jar"/>
<classpathentry kind="output" path="bin"/>

<?xml version="1.0" encoding="UTF-8"?>
<comment>DashboardPrj project</comment>

@java -cp "%~dp0src;%~dp0in;C:/bwi/gwt/gwt-windows-1.4.60/gwt-user.jar;C:/bwi/gwt/gwt-windows-1.4.60/gwt-dev-windows.jar;C:/just4fun/myeclipseprj/workspace/DashboardPrj/lib/gwt-widgets-0.1.4.jar;" -whitelist "^http[:][/][/]www[.]google[.]se" -out "%~dp0www" %* org.gwtbook.Dashboard/Dashboard.html

Also I tried to create Eclipse/MyEclipse project using GWT projectcreator and applicationcreator and imported to my IDE and copied all zip source files to it (because the structures are the same, all same files will be overwritten). But it still has the same problem.

Did anybody have the same issue? Really appreciate your help.

Happy Holidays!
adam.tacy (269) [Avatar] Offline
Re: Cannot run DashboardPrj

Mmmm, that doesn't look fun!

It's complaining that Class.getSimpleName() is missing when trying to use the DashboardCompositeGenerator class (apologies if you can read Java exceptions yourself!!)

The simple fix is to comment out line 79 in DashboardCompositeGenerator (in the org.gwtbook.rebind package) as all it is being used in is a log output. (or just comment out the call to Class.getSimpleName() itself).

For a more detailed explanation, I'll have to do some more digging.....

adam.tacy (269) [Avatar] Offline
Re: Cannot run DashboardPrj
....ok, Class.getSimpleName() doesn't exist in Java 1.4 and that's why you have the issue - whilst GWT needs to use 1.4 syntax there is no such restriction on generators/server side code, or on the jre you run GWT on.

My original development machine has 1.5/5.0 on it so this line gets through.

So, I would suggest either:

a) comment line 79 out as mentioned above, or
b) upgrade your jre/jdk to 1.5 - in Eclipse you can turn your project specifics on to 1.4 mode so you know your client side code adheres to what GWT expects if you need/want.

Hope that helps!

u196598 (4) [Avatar] Offline
Re: Cannot run DashboardPrj
Thanks a lot. I commented the line and everything is fine except all searchings.

When starting the project, you will see following warning:
[WARN] Injected scripts no longer require an associated JavaScript block.

when doing google search, google video search, and blog / video search, nothing happens. no error, no warning. when doing yahoo search component, there is an exception:
[WARN] StandardWrapperValve[shell]: Servlet.service() for servlet shell threw exception
java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
at java.lang.Class.forName(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardValveContext.invokeNext(
at org.apache.catalina.core.StandardPipeline.invoke(
at org.apache.catalina.core.StandardContextValve.invokeInternal(