I found an existing web project. Now I need to add an MDB EJB project and he did the same. The EJB project depends on the Meowen Web project
So far all is well. At the moment, I start using some classes in my MDB web project, it compiles exactly and everything looks fine, but with runtime noClassDefFoundError bombs
I have my web pom Xml and added this to the configuration configuration
& lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 2.1.1 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; AttachClasses & gt; True & lt; / AttachClasses & gt;
and in my EJB POM
& lt; Dependency & gt; & Lt; Group & gt; My.group & lt; / Group & gt; & Lt; ArtifactId & gt; My-web-project names & lt; / ArtifactId> & Lt; Version & gt; $ {Project.version} & lt; / Edition & gt; & Lt; Classifier & gt; Classes & lt; / Classifier & gt; & Lt; / Dependencies & gt;
How to get classes inside my EJB web project
I can not really do it in another way because I do not have permission to edit the web project. By default, all server modules use classloaders and web modules may depend on EJB, please help!
In short, I advise to edit the web project and use one of the two previous solutions, but if you really want to work in the third number solution.
No comments:
Post a Comment