This was a weird one that took me hours

Something stopped working. It was now giving me a 404 (page not found for the unititiated) error.

An HTML form was calling a procedure that was constructing a magic URL that was being used to redirect things back again and pass some arguments back to the portlet.

I used the excellent facility in the Firefox web developer add-on that allows you to turn posts into gets so I could see what it was trying to do. This also shows the hidden fields as well, fantastic.

I changed the procedure to just dump out the arguments it had received into the browser and then return.

I then trimmed and messed with the URL for a while until it did something. Then I added things back in until it broke.

At first I thought it was something to do with using PL/SQL table types (which has always worked as far back as I can remember).

I finally tracked it down to the procedure referencing types defined in a package that is in another database, on the other side of a DB link. I changed the procedure to only use locally defined types and it started working. It seemed to sometimes work if I just took out the tables but then it stopped completely.

Now, I couldn’t do this for the production version because we’ve literally just shipped it. Also, it was working when I tested it a couple of weeks ago, unless I’ve gone completely mad.

I have 2 client databases with different DB links, one is 9.1.x, the other 9.2.×. The portal infrastructure db is 9.2.×. I discovered that if I rebuild (not recompiled but reloaded the code) the package in the remote 9.2 db it works. It won’t with the 9.1 one. Probably something to do with caching PL/SQL but there’s nothing in the log files, even if you try and turn the logging on, which didn’t work for me.

Of course, the long term solution is to change it to use local types but at least I can get things running if there’s a problem out there in the wild.

Oddly the Portal server has not fallen over on me for ages since my last post. Weird.

Added 12 April 2005 we discovered that the constant falling over was due to a lack of disk space.