views:

232

answers:

1

This seems like a simple question but if you Google it there isn't much help.

I have a web app being hosted on BEA Weblogic 10.x with an Oracle 10g database back end. It works perfectly with one database, but when we make a clone of it and try to use a different WebLogic and Oracle instance we are getting this JDBC Type 91 error every time we do a query that involves a column of type DATE.

The reason we are doing this cloning is it is a simple way to move the application from one environment to another. The jar files and configuration of weblogic are identical as far as I can tell.

I can access the database using SQL*Plus using the same access and do selects and updates on the same tables with no errors.

The answer to this question is not just a simple description of what a type 91 error is (although that will help) but what could be causing this given the circumstances described above.

I've confirmed that I am using ojdbc14.jar for JDBC on both instances of weblogic so that's not it.

Figured it out: I needed to set oracle.jdbc.V8Compatible=true. Apparently this remaps the oracle DATE type to a DATETIME time in JDBC. This parameter was missing on the new Weblogic server. Thanks to all who tried to help.

A: 

I have no idea about the error, but have you considered the jdbc jar version and more importantly if the oracle DB needs to be updated.

I faced very weird problems with oracle, and struggled for a while to find at the end that installing some patches for oracle would solve the problem.

Ahmad
I do suspect the JDBC jar file but it is supposedly identical between the two weblogic instances. I will investigate this more in the morning.
Mike