Java Studio Creator Issue with oracle CLOB Fields

We are using JSC2 which creates a cached row set (com.sun.sql.rowset.CachedRowSetXImpl) to implement a simple query on a legacy Oracle table that contains a CLOB column. When the DataDirect JDBC driver is used in the JSC2 development environment, everything works normally when the application is deployed to the internal application server. However, when the war file is exported and the application is deployed to an external system running tomcat and using the Oracle JDBC driver, a rowset exception is thrown. If the CLOB column is removed from the query, the external deployment also works properly so it appears that the exception is related to the CLOB column. This theory appears to be confirmed by the stack trace which appears to show that the metadata length of the CLOB column is negative and the rowset implementation used by JSC does not handle this case.

We understand that the Oracle JDBC drivers cannot be used in the JSC2 design environment because of shortcomings in the Oracle metadata implementation. But, it was our understanding that JSC2 applications can be designed using the DataDirect driver with JSC2 and then deployed to run with the Oracle driver where the metadata requirements are not so onerous. Our simple example appears to violate this understanding. It is a simple JSC application that will not run against the Oracle driver when the database contains a CLOB column.

Has anyone experienced this problem before and if so, is there a workaround available? We were unable to find any similar problems reported in this forum.

Caused by: java.sql.SQLException: Invalid precision value. Cannot be less than zero

at javax.sql.rowset.RowSetMetaDataImpl.setPrecision(RowSetMetaDataImpl.java:354)

at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:875)

at com.sun.sql.rowset.CachedRowSetXImpl.populate(CachedRowSetXImpl.java:789)

at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.ja va:194)

at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:950)

at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1410)

at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDa taProvider.java:1219)

at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDa taProvider.java:329)

... 57 more

I borrowed this post from another member, because I'm suffering from the same exact problem......

help!!! I don't kwow what to do.....

Thanks in advance

[2598 byte] By [moponta] at [2007-11-27 4:29:24]
# 1
Hellooo! sun guys!!!we need your help.......
moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 2
Any solution?I'm already Stuck in this problem for 2 days.....There is a good soul in this forum?
moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 3

Hi there,

I am not sure I know the exact answer to your issue, but this might help

http://developers.sun.com/jscreator/reference/techart/2/clobs.html

also see "Database Access" section under

http://developers.sun.com/jscreator/reference/techart/2/index.jsp

Thanks

K

kish@suna at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 4
Hi!I already used this tutorial and the same problem ocours....I think that could be sun's cached rows set problem with oracle's clobs/blobs ....any solution
moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 5
any help?
moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 6

i'm my project i'm using oracle 9i+tomcat 5.5.17+JSC2 U1

when i try to run a query whit a CLOB/BLOB or when i associate a Table component i got this error;

Caused by: java.sql.SQLException: Invalid precision value. Cannot be less than zero

at javax.sql.rowset.RowSetMetaDataImpl.setPrecision(RowSetMetaDataImpl.java:354)

at com.sun.sql.rowset.CachedRowSetXImpl.initMetaData(CachedRowSetXImpl.java:875)

at com.sun.sql.rowset.CachedRowSetXImpl.populate(CachedRowSetXImpl.java:789)

at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:194)

at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:950)

at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1410)

at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1219)

at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:329)

... 57 more

my great problem is tha I HAVE NO OTHER CHOICE

since the tables in my project have 3 or 4 fields of the CLOB type ....

this bug is VERY SERIOUS in my point of view....

how will Java Studio Creator survive if it just don't works correctly with the greatest DBMS of the world? As an academic tool?

I'm really thinking in give up of JSC...... it's about a year without a new update.....

moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 7

Hi There,

I apologize for the annoying bug. Have you tried the Visual web pack? This is the future version of Creator. Now it is all merged into the netbeans IDE.

Please visit http://www.netbeans.org/ and download netbeans and the visual web pack, the bug might have been fixed in this. Also there will be a new version Netbeans 6 out soon, which will have latest features.

Hope it helps

Thanks

K

kish@suna at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 8
Thank you Kish....But how can I migrate my project to netbeans?Is there any tool for it ?Thanks for the attention
moponta at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...
# 9
This might help http://www.netbeans.org/kb/55/vwp-migration.htmlAll info on VWP at http://www.netbeans.org/kb/55/vwp-index.htmlThanksK
kish@suna at 2007-7-12 9:38:22 > top of Java-index,Development Tools,Java Tools...