Fun with IzPack

In the last cycle of our product at ${work}, I moved away from the custom installer I'd written and built one on IzPack. Overall I was pretty pleased. My original installer worked. Mostly. The new one a much more polished and did more. So there wasn't much to complain about. Except. None of my validators worked. As is the case with many software releases, there was too much to do to worry about it. The installer is almost always used by our internal staff so there wasn't too much concern about bad input. But still, that lack nagged at me. Last week saw the release of said version, and this week we begin, in earnest, all the design and requirements discussions trying to nail down the exact what and how of this cycle so there's not much focused programming going on just yet. The installer needed some other attention so I took a little time to figure out why none of the validators worked. IzPack is horrible about logging/tracing anything useful. In fact, if you look through the code, you'll see a lot of empty catch blocks. Go Team!

I set up IDEA so that I could run the installer in debug mode and step through the IzPack code and figure just what was dying. I was pleased to learn that IzPack craps out on validator messages if there is no langpack defined. You don't actually need anything in the langpack. It just has to be there. In your validator definition you can specify the exact message you want to display or if you want i18n support, you can give a resource ID. If IzPack can't find the ID, it defaults to just printing out that ID. So an empty langpack will (mostly) work just fine depending on how you define things. But if there is no langpack, you'll get an NPE so no dialog will show up but you also won't get any feedback at all for either failure. Once I saw that, it wasn't too hard to set up an empty langpack and viola! Validator feedback. Pure magic.

So, that's it. Set your langpacks. Enjoy the feedback. IzPack is not a bad piece of software, but could use some tender loving...