Getting Dozer Working in Geronimo 2.2.1

03/25/11

Permalink 03:39:25 pm, by david Email , 320 words, 926 views   English (US)
Categories: SOA Solutions in South East Asia

Getting Dozer Working in Geronimo 2.2.1

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.

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

No Comments/Trackbacks/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Hosted by:
hosted by PWS Consulting

The South East Asia SOA Weblog

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.

February 2012
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      

Search

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 9