Snippets code from my daily experience

June 9, 2007

Jdbc Oracle timestamps lose hours/minutes and seconds

Filed under: java,jdbc,oracle — dafi @ 9:30 am

Every Friday about thirdy minutes before I go to home to begin my weekend my collegues make my a very strange question.

This time the question is:

“Hey Davide! Java truncates the timestamps how is this possibile?”

and they continues

“I need this code works before yesterday, please help me to resolve this bug”

Well after some googling I found the motivation, Oracle 10g JDBC driver must be done retrocompatible

Add this line to you application server, Swing application or where you prefer

JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.V8Compatible=true"

The example refers to JBoss

1 Comment

  1. Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language😉
    See you!
    Your, Raiul Baztepo

    Comment by RaiulBaztepo — March 28, 2009 @ 10:21 pm


RSS feed for comments on this post.

Blog at WordPress.com.

%d bloggers like this: