Multi-module Maven and JPA

My project is getting a NoClassDefFoundError when runing/debugging a GWT Configuration in IDEA.  It deploys fine to Tomcat.  This is a multi-module Maven project using Spring/Hibernate with one module (common) containing the JPA persistent classes and a web-app module depending on the common library artifact.  The root problem in a chain of exceptions is a NoClassDefFoundError looking for one of the persistent POJOs:

Caused by: java.lang.NoClassDefFoundError: target/classes/com/multideck/lpm/domain/Company (wrong name: com/multideck/lpm/domain/Company)

Why does it appear that IDEA is looking in the target/classes subdirectory instead of at the common.jar?  Thank you.


I do not yet have an answer, but I am beginning to suspect that this is one of those cases where byte weaving/AOP and proxy classes is causing the problem.  It is not clear why this works in Tomcat and not in an IntelliJ GWT Configuration (development mode).


Hi, Frederick,

Can you please attach a sample project?


Please sign in to leave a comment.