I had a perfectly working Eclipse project with Maven and project dependencies. Now I want to switch to IntelliJ IDEA - importing my projects worked beautifully (now it is called a module with Maven and module dependencies), all Maven configurations seemed to work out of the box (you can expand the libraries and see the source code). When I run my module, I get:
Exception in thread "main" java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStream
From the dependent module, xstream-1.4.2.jar is correctly located in the build path of this module.
What I tried and did not work:
- Import projects as Eclipse projects, followed by Maven support / support framework
- Import projects into Maven projects
- Invalid Caches
- Maven Reimport and generate update sources and folders
Which worked, but is not a solution: I can add xstream-1.4.2.jar depending on the module I am running, but then it does not work with the next missing jar. Thus, it seems that it does not find the bans specified in the reference modules.
Often there is a NoClassDefFoundError when the classpath has two libraries in different versions - I checked twice, there is only one xstream * .jar file.
I appreciate any help.
Thanks Marcel
source share