Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Setting NULL for an Oracle CLOB with SmartGWT 4.0

    This happens on any browser with SmartGWT 4.0.
    I've tried a few of the nightly builds including last nights.

    Isomorphic SmartClient/SmartGWT Framework (v9.0p_2014-02-13/PowerEdition Deployment 2014-02-13)


    This issue does not exist with SmartGWT 3.1 (issue started occurring after upgrade to 4.0).

    Issue:
    When writing NULL to a CLOB column in Oracle, it fails to bind. After some experimentation, I have found that if the datasource specifies that the all CLOB entries are less than 4000 characters, then inserting NULL into a CLOB is successful. However, if the datasource defines any CLOB entry as anything 4000 characters or greater, then the binding of NULL to a CLOB fails.


    When it fails, the query looks like this (obfuscated):
    INSERT INTO my_table(col1, col2, clobcol1, clobcol2, idcol) VALUES (1, ?, ?, NULL, s_my_table.NextVal)

    This is what the stack trace looks like:
    java.sql.SQLException: Missing IN or OUT parameter at index:: 2
    at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at com.isomorphic.sql.SQLDriver.doUpdate(SQLDriver.java:819)
    at com.isomorphic.sql.SQLDriver.update(SQLDriver.java:765)
    at com.isomorphic.sql.SQLDriver.executeUpdate(SQLDriver.java:893)
    at com.isomorphic.sql.SQLDataSource.executeNativeUpdate(SQLDataSource.java:535)
    at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1626)
    at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:408)
    at com.isomorphic.sql.SQLDataSource.executeAdd(SQLDataSource.java:360)
    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1450)

    #2
    Thanks for the error report, this will be fixed in nightly builds of 9.1d and 9.0p as of tomorrow, February 15

    Comment


      #3
      Thanks! I will try tomorrows build.

      Comment


        #4
        Just to follow up: we tried the latest build and it solved the issue.

        Thanks!

        Comment

        Working...
        X