Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWT 2.8 - Super Dev Mode throws NoClassDefFoundError #382

Open
JanecekPetr opened this issue Jul 31, 2018 · 4 comments
Open

GWT 2.8 - Super Dev Mode throws NoClassDefFoundError #382

JanecekPetr opened this issue Jul 31, 2018 · 4 comments

Comments

@JanecekPetr
Copy link

I have a GWT 2.8.2 project and downloaded the current plugin's snapshot from https://storage.googleapis.com/gwt-eclipse-plugin/v3/snapshot.

My versions:

  • GWT 2.8.2 SDK - 2.8.0.201803211650
  • GWT Eclipse Plugin - 3.0.0.201803211650

My project refers to these dependencies in its POM:

<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-user</artifactId>
    <version>2.8.2</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.google.web.bindery</groupId>
    <artifactId>requestfactory-server</artifactId>
    <version>2.8.2</version>
</dependency>

Now, when I try to run Super Dev mode for this project, I get an error:

Exception in thread "main" java.lang.NoClassDefFoundError: cern/colt/map/OpenIntObjectHashMap
	at com.google.gwt.dev.util.collect.IntMultimap.<init>(IntMultimap.java:28)
	at com.google.gwt.dev.StringAnalyzableTypeEnvironment.<init>(StringAnalyzableTypeEnvironment.java:68)
	at com.google.gwt.dev.MinimalRebuildCache.<init>(MinimalRebuildCache.java:192)
	at com.google.gwt.dev.CompilerContext$Builder.<init>(CompilerContext.java:37)
	at com.google.gwt.dev.DevModeBase.<init>(DevModeBase.java:636)
	at com.google.gwt.dev.DevMode.<init>(DevMode.java:463)
	at com.google.gwt.dev.DevMode.main(DevMode.java:430)
Caused by: java.lang.ClassNotFoundException: cern.colt.map.OpenIntObjectHashMap
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more

It looks like the eclipse plugin correctly adds gwt-dev.jar to the classpath, but not any of its required dependencies...

classpath screenshot

@branflake2267
Copy link
Contributor

branflake2267 commented Jul 31, 2018

Be sure gwt-dev is on the classpath for debugging, it contains the super dev mode classes.

@branflake2267
Copy link
Contributor

Or the gwt-codeserver, it contains the classes too.

@branflake2267
Copy link
Contributor

Oh wait, I forgot, Eclipse ads gwt-dev in launchers classpath without having it on the maven pom.xml config.

So it looks like the gwt compiler doesn't know about 'cern.colt.map.OpenIntObjectHashMap' possibly, so then it's a matter of adding it to the classpath of the GWT compiler in the module descriptor or via build path.

@JanecekPetr
Copy link
Author

Eclipse ads gwt-dev in launchers classpath without having it on the maven pom.xml

Exactly. The plugin should add the gwt-dev.jar's dependencies to the classpath, too.

Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants