Solved

oracle 10.2.0.5 jdbc driver

Posted on 2011-02-14
8
1,557 Views
Last Modified: 2012-05-11
is 10.2.0.5 jdbc driver compatible with oracle database 10.2.0.4?    we are seeing issues once we upgrade the jdbc driver from 10.2.0.1 to 10.2.0.5.

we are getting ORA-00932: inconsistent datatypes: expected DATE got NUMBER.   our developer described the issue seems to be the code expecting java..util.Date but we are getting java.sql.Date.  
0
Comment
Question by:dba840
  • 5
  • 3
8 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34893159
There shouldn't be an issue with versions.  The problem is likely an issue with implicit date conversions.

Oracle can convert strings to dates itself IF everything is correct.  This rarely happens.  

The developers should force string to dates with the Oracle TO_DATE call specifying the mask for the string and force the java date call to a matching specific string.
0
 

Author Comment

by:dba840
ID: 34898445
Well it was working fine before with 10.2.0.1 version of jdbc driver.   this might require code change or upgrade rdbms to 10.2.0.5 for fix but just wonder if anyone has run into similar issue with 10.2.0.5.   thanks.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34898575
You can control the 'default' date format for Oracle with NLS_DATE_FORMAT.  Try setting that value on the client side to match the format produced by Java.

It's possible they did that for the old install.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Accepted Solution

by:
dba840 earned 0 total points
ID: 34928770
our developer resolved the issue by setting -Doracle.jdbc.V8Compatible=true
 it is compatiblity issue with older oci8 driver that our app uses.

thanks for all your comments.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34928795
Glad you finally got the issue resolved.

I suggest you select your last post, http:#a34928770, as the solution in case anyone else runs into this probem.
0
 

Author Comment

by:dba840
ID: 34928871
see above comments.
0
 

Author Comment

by:dba840
ID: 34928878
since 9i oracle jdbc driver has changed how it handles date and other datatypes that might requires this settings if you still use oci8 driver each time you upgrade your jdbc driver.

more information:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
0
 

Author Closing Comment

by:dba840
ID: 34959184
since 9i oracle jdbc driver has changed how it handles date and other datatypes that might requires this settings if you still use oci8 driver each time you upgrade your jdbc driver.

more information:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question