users@glassfish.java.net

Re: (resend) how to set Oracle connection property in GlassFish admin web console?

From: <modjklist_at_comcast.net>
Date: Tue, 28 Aug 2012 20:06:26 +0000 (UTC)

As a third method, I entered the SetFloatAndDoubleUseBinary=true setting in the Configurations/server-config/JVM Settings/JVM Options screen. That's where the java heap size is set along with a lot of other things. If I add


-Doracle.jdbc.SetFloatAndDoubleUseBinary=true


as a new property, save the screen, then restart the domain and run my app again, it still fails. By "fails" I mean I get the error


java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: number precision too large


when I try to write a large number to a database via Java and JDBC connection pool using


cs.setDouble(1, myDoubleVariable);


where myDoubleVariable=1e200D for example. Since this is larger than Oracle NUMBER datatype limits (1e127), the error is generated because standard JDBC setDouble converts double in Java to Oracle NUMBER datatype. The switch is supposed to prevent this conversion. What could I be doing wrong? If I set myDoubleVariable<1e127, everything works fine.

----- Original Message -----
From: "Anissa Lam" <anissa.lam_at_oracle.com>
To: users_at_glassfish.java.net
Sent: Tuesday, August 28, 2012 10:08:40 AM
Subject: Re: (resend) how to set Oracle connection property in GlassFish admin web console?


Thats how you set the property for a connection pool in the console. Maybe this property is not recognized ?
Let me ping the developers of the JDBC pool.

thanks
Anissa.