Jetspeed Argh!

I can't believe it is over a month since my last post. That shows what two weeks of vacation followed by two weeks of attending/hosting large meetings at work will do for you. Part of catching up from vacation is putting the pictures on the site for my family. This is a less tedious process since I wrote my automatic photo album, but it does still require renaming the picture files so that they make some sense. I thought I was all caught up when I renamed the last file.

I of course failed to reckon with my latest problem with Jetspeed. Lately I've been using the Maven Jetspeed plugin to develop a customized portal based on Jetspeed 1.5. I had it up and running for at least a month, and thought everything was fine. Once I'd uploaded the latest set of pictures, I tried to add an account for a family member so that they could get to the pictures. Boom: big exception stack trace. After much screaming and whining on my part, I finally tracked the problem down. I converted Jetspeed to run with MySQL 4.0.20 when I brought up this Weblog, because Roller doesn't work with Oracle. I had problems at first, because the mysql script distributed with Jetspeed doesn't work with Mysql 4.0.20. I found a mysql-4 script in current CVS head, and thought I was good to go. I was until the first time I tried to add a user! It turns out (after hours of investigation), that this script doesn't have the AUTO_INCREMENT keyword, and the exception stack trace that occurs when this problem happens is less than helpful.

Anyway, I'm back up now. All's well that ends well, I guess.

Linux & Cygwin are cool too

I finished a quick bash shell in cygwin that deploys the local copy of Jetspeed that I built to my server. The new version uses ssh and scp to undeploy the old version and deploy the new one. I successfully deployed a new version from Sunnyvale tonight. Way cool!

Learn something new every day

For the last day and a half, my messages to the Jetspeed mailing lists have not been delivered. I was starting to be afraid I either had a really weird system problem or I'd been silently blacklisted. I tried sending mail to postmaster@jakarta.apache.org, and received a reply that set me straight. Apparently, since I changed the domain name I use in my e-mail, my incoming messages were from a different address than the one I'd subscribed with. Therefore, my messages were queued for a moderator. The Jetspeed moderator is travelling, so my messages haven't been delivered.

I've corrected my subscription, so hopefully I won't be bothered by this problem again. It was intersting to know though; I'm sure this is how spam is avoided.

Phase one is done!

The initial phase of re-working the portal component of my site is done; I've deployed an updated Jetspeed-based portal with a custom-built skin that, in general, matches the Currency skin provided with roller.

I've also successfully converted the database behind Jetspeed from Oracle to MySQL. This was a larger pain than I expected because the Jetspeed 1.5 scripts for MySQL don't work with MySQL 4.0 (the latest version). I got the scripts from the current source tree, which almost worked. I also built the PSML database scripts for MySQL manually, because it was faster than figuring out how to get Torque to generate them.

I've also successfully isolated ALL of the customizations I've done to the default Jetspeed 1.5 distribution now, so that upgrading to 1.6 should be much easier than going from 1.4 to 1.5 was.

Next up: Add the ability to remove files from the default distribution when building a customized portal using the Jetspeed Maven plugin. Then I can get rid of a bunch of cruft that comes with the distribution. Hooray!

Jetspeed Skinning/Deployment

Well, it's been quite an excercise over the last week or so. I've been using the Jakarta Jetspeed portal as the main section of my website (wittle.net). Then I added roller as a weblog tool. I liked the skins available with roller so much better than the ones with Jetspeed that I decided to make a Jetspeed skin that matched my favorite roller one. What an excercise!

First, there's a pretty good amount of formatting information embedded in the multiple velocity templates, so I ended up changing ~15-20 files to get the look I wanted. Second, I found a bug that messes up the base URL specified in the head section of some of the templates, which breaks the images for the controls.

Lastly, I wanted to make these changes in separate files so that I could migrate Jetspeed versions without major pain and suffering. After quite a while of trying to get this to work, I found that the old method of isolating customizations, which involved specifying a new, custom .properties file in Torque.Properties was incompatible with the new way that uses a Maven plugin. If you have an include statement in a Mavven merge file, it tries to follow the include to merge the properties from the include file and can't follow the link.

Finally, though, I've got the skin I wanted. Now I need to finish converting over from Oracle to mysql as the database behind Jetspeed so that I don't have to use different databases for Roller and Jetspeed. If only Roller was database-agnostic, I'd be happy. I know mysql is open source and fast, but I'm not that excited about learning a bunch of new management tools just to make Roller happy. I started to look at converting Roller to use Oracle, but there are too many mysql-isms in the code to make that easy.

Working on the warnings

I've been working on the warnings generated during a Jetspeed build in Eclipse. I've removed several hundred of them, but those were the easy ones. I'm down to less than 100 now, but they're harder than they were originally. Hopefully, it won't be too much longer until I can submit some for checkin.

Jetspeed wants the RSS fix

It's great; this is the first fix I've submitted to an open source project. The RSS problem I found and fixed (see my previous entry) is interesting to Jetspeed team; I filed a bug and attached a fix. Hopefully it will get reviewed and included soon.

Fixed Jetspeed RSS Portlet

It sure took a long time for something so simple, but I fixed the RSS portlet to correctly (in my view at least) handle HTML markup in RSS description tags. According to my (brief) research, escaped HTML markup is legal in RSS 0.92 description tags. Jetspeed's NewRSSPortlet class was passing the escaped HTML on to the browser, which printed the HTML code along with the description text on the page. Not cool.

The goal was simple; find the Description tag, and unescape the HTML. It proved more difficult than I'd like to find the Description tag (I ended up processing the entire RSS stream, I think). I also couldn't find an existing HTML unescape method in Jetspeed. The Jakarta commons.lang 2.0 package has one, so I dropped commons.lang 1.0 from my Jetspeed 1.5 source and substituted 2.0. This allowed me to use the StringEscapeUtils.unescapeHtml() method in commons.lang to process the RSS stream before it gets rendered by the portlet.

Now, when you look at the wittle.net home page, you'll see a correctly formatted BLOG session from this blog!.

Upgraded roller

OK, I've updated Roller from 0.9.8.2 to 0.9.9-stable 2. This fixed the inability to change themes, but I found a bug/strange feature where if I deleted the News folder, the Blogroll section gets repeated. The outstanding support of the Roller developers gave me a workaround within an hour of filing the bug. Fixing the display template macros cleared up the problem.