Compile ClassNotFoundException com.google.gwt.dev.cfg.ModuleDef

Hi,

I put together an example project using GWT (Java client) + Scala (server backend) + Maven. You can find the example on GitHub.

The project compiles and runs fine outside of Intellij 12 using:

mvn clean install
mvn tomcat7:run-war-only

In IntelliJ, I assigned the Scala facet to the server module (see attached screenshot). I'm using a Local Tomcat7 build run configuration with the following build/make/launch artifacts:

  • Make
  • Build 'web:war exploded' artifact


During the make step, I always get a ClassNotFoundException during scala compile:

scala: Error: com/google/gwt/dev/cfg/ModuleDef
java.lang.NoClassDefFoundError: com/google/gwt/dev/cfg/ModuleDef
...

The full exception is attached.

Ordinary Scala apps are working fine. Also, I can compile and run this project without problems if I use Java instead of the Scala code in server module. So problem seems to be related to GWT plus Scala usage.

How do I solve it?



Attachment(s):
facets.png
exception.txt.zip
4 comments
Comment actions Permalink

Please try to disable "external build" in IDEA as workaround for your problem, probably, it can help.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Ok, that worked, but as far as I understood this is the legacy mode for compiling, isn't it? So will this be fixed? Should I open a ticket for it?


0
Comment actions Permalink

Yes, we have plans to disable "Internal mode", when most "External mode" problems will be fixed. So you are right, ticket is great idea.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.