One would assume that this is a simple thing at the outset but… not quite so fast. This actually took me a couple of days of hard slogging and debugging. The bottom line is that the the time is worth it for getting a value object mapping framework in place for one of the major applications we are building but there is a moderate amount of pain getting it going.
The major issue I struck with Dozer 5.3.2 is that the documentation on installation and configuration is non-existent for application servers. It also seems there have been so0me challenges with the class loader that Dozer uses internally. This relies on Apache Commons Lang 2.5 (the ClassUtils package). Once I had all of the minor stuff sorted out (XML mapping… BTW I recommend that you build a java main() to test your mappings out, especially if you are mapping a deep and complex structure as we are. There are a number of the advertised features of Dozer that are not well documented and also at times just do not work as expected. So you will need to play around with the XML mapping file and learn all of the constructs (which also takes a little time). What I ended up doing was downloading the Dozer sources and modifying the class loader because it was having problems in Geronimo (probably due to Geronimo’s class loading scheme). Anyway… a simple Class.forName() instead of using the CLassUtils calls to create the DefaultCLassLoader in Dozer and the problems were more or less solved.
I also ended up bundling everything up into a single JAR so that the dozer.properties, dozerBeanMapping.xml and the required XSD schema was on the classpath of the application… BTW, prior to this I tried all sorts of things (building a Geronimo adapter, deploying to the repository, placing the Dozer JAR file in the /lib/endorsed etc… all to no avail.
No Comments/Trackbacks/Pingbacks for this post yet...
The intention of this blog is to collect thoughts on the issues, paradigms, process, vendors, solutions, project and any other item related service oriented architecture in South East Asia.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | |||