GoogleMap widget compile errors

For my hobby I want to create an application where I can add radio amateur locations in a database when I had a conversation.
The locations in the database should be dynamically and when you look at the map it automatically add the connected radio amateurs.

But I just tested the GoogleMap add-on.
When I add the jars to the lib directory and I compile the widget I get compile errors.

How can I resolve this and create a nice application with this add-on?

Chris

java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.google.gwt.maps.jsio.rebind.JSWrapperGenerator.generate(JSWrapperGenerator.java:276)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:681)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:285)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:274)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:251)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:170)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:285)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:587)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:525)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:538)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:492)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:405)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:194)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:164)
at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:131)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:82)
at java.lang.Thread.run(Thread.java:680)

[ERROR]
Unexpected
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.google.gwt.maps.jsio.rebind.JSWrapperGenerator.generate(JSWrapperGenerator.java:276)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:681)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:285)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:274)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:251)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:170)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:285)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:587)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:525)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:538)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:492)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:405)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:194)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:164)
at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:131)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:82)
at java.lang.Thread.run(Thread.java:680)
Widgetset compilation failed

No answer for this problem.

I emailed the author of this add-on but did not get an respont.
Pitty because I really would like to use this add-on.

Now this add-on is useless.

Chris

After almost 2 moths no responds from the author or an other vaadin user with an solution for this problem.

Question, when a add-on is useless and and no solution is provided will the add-on be removed from the download centre?

It is annoying when I spent a lot of time trying to make a useful project but being stuck because the add-on is not working.

Chris

Hi Chris,

Thanks for your problem reports but unfortunately I’m way too busy with other duties to provide support for this hobby project add-on.

Without verifying your problem I’ll hazard a guess that it arises from a incompatibility with recent Vaadin and GWT versions. Which Vaadin version are you using? I originally used Vaadin 6.3.4 to create the add-on.

I am using the latest version of vaadin.

After a few minutes of researching that exception I found out that the GWT maps wrapper JAR in the add-on is not compatible with GWT 2.2 and later. This broke the add-on for Vaadin after 6.6.0, because that’s when Vaadin upgraded from GWT 2.1.1 to 2.3.


Here is an article
explaining the problem, and suggesting a fix that requires patching the maps wrapper on bytecode level.

That sounds pretty bad, but fortunately it’s not necessary do that.

As it happens, the latest build of the GWT maps wrapper JAR (version 1.1.1. available
here
). is compiled against a newer version of GWT, and will work just fine with at least Vaadin 6.8.2.

So, just download the new version of gwt-maps.jar and replace the one from the add-on ZIP with that, and you should be good to go.

Thanks a lot.

With the new jar file the widget is compiled and the googlemap is shown.
Here the code of my test project.

Chris

import java.awt.geom.Point2D;

import org.vaadin.hezamu.googlemapwidget.GoogleMap;
import org.vaadin.hezamu.googlemapwidget.overlay.BasicMarker;

import com.vaadin.Application;
import com.vaadin.ui.*;

public class GooglemapApplication extends Application {
@Override
public void init() {
Window mainWindow = new Window(“GoogleMap Test Application”);
setMainWindow(mainWindow);

	GoogleMap googleMap = new GoogleMap(mainWindow.getApplication(), new Point2D.Double(5.726338, 51.976908 ), 12);
	googleMap.setWidth("800px");
	googleMap.setHeight("600px");

	googleMap.addMarker(new BasicMarker(1L, new Point2D.Double(5.726338, 51.976908 ), "MyHome"));
	mainWindow.addComponent(googleMap);
	
}

}

Online example:


MyHome