Here I come with another question that will probably not be answered because it's a wierd problem!!! We are using Rational Software Development Platform V6 with WebSphere V5.1 to run our application. We work with a CVS to share the sources. The application generates a PDF report and ZIPs it, then it puts it in the data base (Oracle 9i) in a BLOB field. Up until now, everything works fine. With RAD, we use the ojdbc14.jar to connect the data base (we've been using it since forever...). So, that being said, when we run the application locally, the following line raises an exception:
tempBlob = BLOB.createTemporary(cnn, true, BLOB.DURATION_SESSION);
The exception is an SQLException saying invalid argument(s) in call. Looking at this, I don't see which argument might be wrong, since the data base access is centralized and the object cnn is OracleConnection type, that is retreive with the same function we use all over the application. SO, I tryied using ByteInputStream to set the parameter of the prepared statement using setByteStream. The value of my byte array is ok, it contains something like 2 MO. When I execute the query, it says 1 row update. There is a field in the data base call finished_time that is successfully updated and the other field, the report field, is null....
If I go back to the createTemportary function, we worked 3 developers for a day to trouble shoot the problem, an we found nothing wrong... So, I decided to migrate the code on the DEV server. I commit the changes, create a totally new workspace开发者_运维问答, checked out and run an Ant build, that builds, sent through FTP the WAR and deploys it on the WebSphere server. Then I try the report generation and the DB is successfully update. The function createTemporary doen't raise any exception, but locally. The problem is, no one of us can do that locally!?! How comes? Any hint?
I don't know if it can help but i was in the same case. I was trying to insert a streamBuffer in a blob. I work with a Oracle database inside a Ubuntu OS. I fix the problem by changing the oracle ojdbc driver. I upgrade it with the 10g version. it seems that the 9 version doesn't work properly when you try to work with BLOB type. I hope it can help. Good luck ...
精彩评论