I'm developing a web application with Eclipse 4.4.2, Maven and Tomcat v7.0. The application consists of a
<packaging>pom</packaging>
)<packaging>jar</packaging>
, has some auto-generated classes)<packaging>war</packaging>
, depends on AppModel)AppUserInterface and AppModel are modules of the AppSuite.
The issue I'm currently facing is that if I have all three projects opened in Eclipse and I try to run the AppUserInterface on the server, everything gets moved to the tomcat webapps
folder correctly (*.class
files of the AppUserInterface and all the libs including AppModel.jar
) but tomcat throws an exception
java.lang.NoClassDefFoundError: com/app/model/ClassName
But If I close the project AppModel in eclipse everything runs fine when I run AppUserInterface on the server.
I suspect that eclipse becomes confused If AppUserInterface shall work with the local AppModel.
Any thoughts to resolve this error, so that I can have all three projects open at the same time and still run AppUserInterface?
EDIT: The java.lang.NoClassDefFoundError: com/app/model/ClassName
class is not an auto-generated class.
Added the bounty and 2 mins later found the solution ...
The solution is the anwser of rmtheis in this topic Strange "java.lang.NoClassDefFoundError" in Eclipse which I hadn't found until now . A simple Project->Clean...
solved this issue somehow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With