wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes oracle.jdbc.V8Compatible=true Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "oracle.jdbc.V8Compatible=true" Watch "oracle.jdbc.V8Compatible=true" New topic
Author

oracle.jdbc.V8Compatible=true

Nainar Mohamed
Greenhorn

Joined: Dec 15, 2007
Posts: 9
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
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10046
    
163

Try passing it through the run.conf file present in the bin folder.
Something like:


[My Blog] [JavaRanch Journal]
Nainar Mohamed
Greenhorn

Joined: Dec 15, 2007
Posts: 9
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

Joined: Dec 15, 2007
Posts: 9
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
Marshal

Joined: Jul 20, 2005
Posts: 10046
    
163

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

Joined: Dec 15, 2007
Posts: 9
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: oracle.jdbc.V8Compatible=true