Upgrading Hibernate, Struts and Display Tag
Last night, I upgraded a number of AppFuse dependencies: Hibernate → 2.1-rc, Struts Nightly from 2 weeks ago → Dec. 2nd and the Display Tag → 1.0 B2. The upgrades weren't as smooth as I'm used to, so I thought I'd share my experience to help y'all when you upgrade.
First of all, I found that Hibernate has ditched the Java Caching System (JCS) for their own, appropriately called Easy Hibernate Cache. This means you can forget about including jcs.jar in your webapp, ehcache.jar is now required. I upgraded from Hibernate 2.0.3.
Struts has done some trimming of their own - getting rid of their dependency on commons-lang. I use commons-lang.jar in AppFuse, so I had to dig into the contrib directory and grab it from there.
I had several issues with the displaytag when upgrading (from 0.8.5), but managed to figure them all out. First of all, the displaytag.tld in the jar's META-INF directory had the following in it's <taglib> declaration:
<taglib xmlns:html="http://www.w3.org/1999/xhtml">
This is obviously invalid, and I had to unjar, fix, and re-jar to get around this. I believe that this has been fixed on SF. I also found that this new version requires commons-collections 2.1. Struts must ship with an older version, so I simply replaces Struts' commons-collections with the one from the displaytag download.
- The newer commons-collections is around 500 KB smaller - wierd, eh?
Lastly, I had to configure the ResponseOverrideFilter in my web.xml in order to get export functionality with Tiles. I had to tweek a LOT of CSS for this upgrade, but at least it's done now and hopefully I won't have to do it again for quite some time.
I also attempted to run AppFuse (with all these upgrades) in Tomcat 5.0.16 with no luck. With Hibernate 2.0.3, it was giving me an IllegalStateException when registering a new user. This process sets "Remember Me" cookies and redirects to the LoginServlet, which does a post to j_security_check and redirects to the originally requested page. Works fine in Tomcat 4.1.x, but not in 5.0.16. With Hibernate 2.1-rc1, I had to include jta.jar in $CATALINA_HOME/common/lib and now it still fails, but I get no errors whatsoever (those are always fun, aren't they). Also, still no luck with using J2EE 1.4.
Posted by Unknown on December 11, 2003 at 02:31 AM MST #