Thursday, January 22, 2009

HTTPUnit in DB2 stored procedure

That was nightmare - running HttpUnit as a stored procedure (don't ask me why) on 8.2 was crashing db2fmp to heap dump. After two days tossing xercesImpl.jar here and there, I decided that was enough and upgraded DB2 to 9.5 Viper-2! Pretty cool XML support and a lot of other large-scale-supporting stuff, but all I need is stable interpretation of my precious stored procedure.

And guess what? It works! More or less... Xerces still unable to find something important inside HttpUnit, but at least no crashes. I guess it's because Xerces uses something internal as a classloader, that's why they have so many problems with shared libraries, etc. So, I've just put that nasty JARs here and there and everywhere (yes, that's not any kind of production system, just a learning application) and now it seems working fine. Well, I'm not sure yet, because it's quite a long-running procedure, but I will know for sure in about ten minutes.

Keeping my fingers crossed + +

UPD: Yes, it works finally. Also, I've found a nice article about HtmlUnit vs HttpUnit. Damn.

No comments:

Post a Comment