Are you using the Java or the C version of Tom Kyte's code?
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:341817437103