Vita Rara: A Life Uncommon


Compiling JasperReports JRXML Files with Maven

Categories: |

I recently started using JasperReports in Quadran. I'm using Maven to manage the Quadran project, and I wanted the JasperReports to fit into the process like everything else.

There is a Maven plugin in the Mojo collection for compiling jrxml files. Currently the plugin is in the sandbox, so you will need to check it out of Subversion and install it yourself in your local Maven repository.

Integration Testing Struts 2, Spring, and Hibernate JPA

Categories: | | | |

Last night with the help of loraxorg on the Spring Forums I got integration testing working under Maven 2 with Struts 2, Spring, and Hibernate JPA working. This was failing priorly due to a transient dependency in Maven 2 to an old version of Xerces. (See the Spring Forum thread for the solution.)

I have not done a lot of test driven development in the past, and personally I don't really get a lot of value out of isolated Unit tests. Integration testing on the other hand I like. Real data, real connections, real functionality, and at the moment for me real failures. I'd rather know now though.

Maven Jetty Plugin Logging Woes

Categories: | | |

My logging issues weren't completely over yesterday. I first adopted the "org.apache.commons.logging.impl.SimpleLog" method in the Jetty plugin, but this still spewed far too many lines of logging in my Struts 2 application. The major culprit was FreeMarker. It logs a tremendous amount of data. Far more than I would ever think the average non-FreeMarker developer would ever need.

So, I decided I needed to go the log4j route, so I could control the levels for the various libraries. I copied the dependencies section as explained on the jetty page. This lead to errors when parsing JSP pages and tags. Something in those dependencies introduced something strange into the Jetty runtime environment. After futzing about for a while, and sleeping on it I decided to just delete the dependencies and still try to use log4j. Lo and behold it worked. I started with the file in /src/main/resources created by the Struts 2 Maven archetype as my starting point, and now I have a finely tuned log4j setup.

Maven Jetty Plugin Logging

Categories: | | |

I've gotten Maven, Jetty, Spring, and JPA playing well together! I've ecstatic. Bye, bye JBoss. I don't know that I'll never run JBoss for development again, but I don't think it will be common.

Anyway, upon getting the Jetty Maven Plugin working (mvn jetty:run) it was logging too much debug information. Hitting one page ran out a 10,000 line buffer on my terminal. There was a simple quick fix though. Add a few properties to the plugin configuration in your POM file and voila, reasonable logging.

Kicking the JBoss Habit: JBoss, JPA and Spring? Or Spring and JPA?

Categories: | | | | | | |

Hi, my name's Mark and I'm a JBoss user.

Ok now everyone.... "Hi Mark."

I have been a JBoss user for many many years. It all started with the seductive siren of Enterprise Java Beans. I still have a deployed application running on 2.4.3, or something like that. (Behind a firewall, thank heavens.) Well, today I took a few more solid steps toward kicking the JBoss habit.

If you've followed this blog you'll remember that I'm working on an ERP application for a client, Quadran. Yesterday I fought with query issues and JSP reloads for hours. With JBoss it's compile, package, re-deploy, wait. Change a few characters, compile, package, re-deploy and wait! It finally got to me.

Syndicate content