Tuesday, August 25, 2009

JasperReports and Weblogic deployment issue

Hello everyone,

Recently I added dependency to Jasper Reports 3.5.2 and my deployment on Weblogic 10.3 failed with exception similar to listed below
java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
As far as I discoved later there can be 2 possible reasons for that. Jasper Reports has dependencies to xerces-impl and xml-apis which can cause conflict with libraries already included in Weblogic. For more details visit appropriate link.

Therefore correct appropriate pom.xml in order to exclude mentioned dependencies:

< dependency >
< groupid > jasperreports </ groupid >
< artifactid > jasperreports </ artifactid >
< exclusions >
< exclusion >
< groupid > xerces </ groupid >
< artifactid > xercesImpl </ artifactid >
</ exclusion >
< exclusion >
< groupid > xml-apis < /groupid >
< artifactid > xml-apis < /artifactid >
</ exclusion >
< /exclusions >
</ dependency >

Enjoy!

Wednesday, August 12, 2009

Groovy compilation problem while creating report using Jasper Reports

Sorry for so big delay in posting :)

Recently while creating report using Jasper Reports 3.5.2 I faced the issue with compilation error:
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException

It was quiet strange cause I'm using pure Java without Groovy.
I found solution on somebody's blog.

In order to solve mentioned issue simple edit your jrxml template and remove the language="groovy" attribute from jasperReport node.

Enjoy!