Module dependency

In a project, I have a Web module, and a Java module. The Web module has a dependency to Java module.
When I deploy the web module to Tomcat (Local config) the Web module is deployed but then the application throws java.lang.NoClassDefFoundError

So it seems like the module dependency is not respected.

Am I doing it wrong?

2 comments
Comment actions Permalink

In order to include Java module to your Web app you need to add it to configuration of an artifact which is deployed to Tomcat.
Open File | 'Project Structure' dialog and select your artifact under 'Artifacts' group. The artifact editor should show a warning 'Module ... is
missing from the artifact', click on 'Fix' button to add the module to the artifact.

In a project, I have a Web module, and a Java module. The Web module has a dependency to Java module.
When I deploy the web module to Tomcat (Local config) the Web module is deployed but then the application throws java.lang.NoClassDefFoundError

>

So it seems like the module dependency is not respected.

>

Am I doing it wrong?

>

---
Original message URL: http://devnet.jetbrains.net/message/5320250#5320250



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thx! that worked well!

Just a side note. By default all the dependencies are compiled to WEB-INF/classes which means if there's a single file (let's say a configuration file) with the same name in all the modules, then it gets overwritten.
It would be much better if the dependencies are configured to be in WEB-INF/lib automatically (as they are usually in the real life). This can be achieved manually however, no problem. But just a usability factor.

Thx again!

0

Please sign in to leave a comment.