I'm currently trying to use Dozer (5.5.1) on a Web Service to map data between two objects. I've successfully been able to perform the mapping in a simple java application and I'm trying to do it in a Dynamic Web Project in Eclipse.
When I'm trying to instanciate the mapper, I get this error:
(The line:DozerBeanMapper mapper = new DozerBeanMapper();)
I search for my problem and I've seen it could be a classloader problem, so I tried to resolve it using this:
But then, this error occurs:
Exception: java.lang.NoClassDefFoundError: org/dozer/util/DozerClassLoader; nested exception is:
I've include this jar to my projects:
I've made searches on the net and I try many solutions but no one works. I finally find a solution which work with my build but I'm not sure it's the best way to do it.
Seems that the Dynamic Web Project use two differents source for JAR lib or at least 2 different classloader. I don't know why change the classloader don't work but I copy the jar used for Dozer in the Web-INF/Lib and I've finally been able to instantiate the Dozer class.