Search code examples
ejb-3.0jboss7.xclassnotfoundexceptiondozer

Can not deploy a project on Jboss because of a Dozer class not found


Hi I'm using Eclipse on a EJB3 project, struts2 and hibernate.Server is JBoss 7.1. Everything worked fine. Then I've installed Dozer 5.2.2,and added that to the build path (it shows in "referenced libraries" folder, and I've checked in the "configure build path" menu as well) It works fine in my Junit test cases. The problem is that when I try to deploy the EJB project , I get an error :

Caused by: java.lang.ClassNotFoundException: org.dozer.DozerBeanMapper from [Module "deployment.EJBprofile.jar:main" from Service Module Loader]

What am I doing wrong? Thanx for your help


Solution

  • You could install the Dozer as a module if you need it for both your EJB and your WAR. You could also package everything into an EAR and put the Dozer library in the EAR/lib directory.

    Also have a look at how class loading works.