• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

oracle.jdbc.V8Compatible=true

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We have upgrading to oracle 10g from oracle 8i.
I seems that Oracle 10g doesn't support the date/time format in 8i.
I searched in the internet and found that, I need to use oracle11g's jdbc drivers(ojdbc5.jar) and set the Doracle.jdbc.mapDateToTimestamp as false.
And also most of the other sites suggest to set the Doracle.jdbc.V8Compatible as true.

Now the question is, how do I set these values and where do I set these values.

As I am connecting with DB from JNDI, using the class DataSourceUtils 's static method -(getDataSourceFromJndi(String)), I think I need not have to include anything in java code. Because, XXX-ds.xml will pass the values to the class at the runtime and hence I tried using the tag connection-property tag in the XXX-ds.xml, but this is not working.
I have also tried adding below lines in run.sh, which is also not working.
JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.V8Compatible=true"
JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.mapDateToTimeStamp=false"


PleaseSuggest me about how to set, V8Compatible=true/mapDateToTimeStamp=false.

Our application is not standalone application, so I dont think, we can implement this from the java prompt.

I appreciate your help in advance.

Cheers
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try passing it through the run.conf file present in the bin folder.
Something like:
 
Nainar Mohamed
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I appreciate your help.

I have added the lines mentioned into the run.conf which is also not resolving the issue.

Have forwarded this issue to our DBA, would post the detals of the resolution(if it something to be done with the oracle query), once I receive them.

Cheers
 
Nainar Mohamed
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

Is there anything which I need to do in the jboss after making the changes in the run.conf file, for the changes to come into effect, other than restarting the server.

Even after setting the values to v8compatible=true and mapDateToTimeStamp=false, the error continues to be there and our DBA's are also not able to solve the problem.

Please do the needful and
Thankyou very much for your help in advance.

Regards,
Nainar
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's your application on JBoss? I mean, is a WAR file? Just to make sure that these JVM parameters are being passed properly and being picked up, i would write a simple jsp (or through some other class in the application) which would dump out the System properties. Something like this:



This would show all the parameters that were passed to the JVM. Check the console or server.log for this output. See if the parameter is getting passed.
 
Nainar Mohamed
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

Thank you very much for your idea.

We managed to fix this issue in DB side.

We just have to change the type of the column from DATE to TIMESTAMP, which resolved the issue.

Regards,
Nainar
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic