java.sql.SQLException: Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)...

MuleSoft JIRA | Juan Manuel Sanmarco | 1 decade ago
  1. 0

    I'm trying to perform an insert on an Oracle Database. The problem I have is with null parameters to be passed to the statement. The jdbc dispatcher performs a: int nbRows = new QueryRunner().update(con, writeStmt, paramValues); Looking at the QueryRunner code I can see that the update method invokes the fillStatement operation: protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { if (params == null) { return; } for (int i = 0; i < params.length; i++) { if (params[i] != null) { stmt.setObject(i + 1, params[i]); } else { stmt.setNull(i + 1, Types.OTHER); } } } When a null value is found, the stmt.setNull(i + 1, Types.OTHER); is called and the following exception is thrown: java.sql.SQLException: Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)... at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:399) at org.mule.providers.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:98) at com.lumina.integration.mule.providers.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:61) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:196) Apparently the error is because of the Types.OTHER sql type. I know that this is an issue involving Jakarta dbutils package but maybe someone has already got this problem and found a workaround to this. At the Jakarta mailing list a workaround is mentioned by subclassing the QueryRunner class. In order to do that, I'll need to subclass the JDBC provider completely (the dispatcher and factory at least). Perhaps a custom QueryRunner could be injected to the JdbcMessageDispatcher in a future version. Regards, Juan Manuel

    MuleSoft JIRA | 1 decade ago | Juan Manuel Sanmarco
    java.sql.SQLException: Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)...
  2. 0

    I'm trying to perform an insert on an Oracle Database. The problem I have is with null parameters to be passed to the statement. The jdbc dispatcher performs a: int nbRows = new QueryRunner().update(con, writeStmt, paramValues); Looking at the QueryRunner code I can see that the update method invokes the fillStatement operation: protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { if (params == null) { return; } for (int i = 0; i < params.length; i++) { if (params[i] != null) { stmt.setObject(i + 1, params[i]); } else { stmt.setNull(i + 1, Types.OTHER); } } } When a null value is found, the stmt.setNull(i + 1, Types.OTHER); is called and the following exception is thrown: java.sql.SQLException: Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)... at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:399) at org.mule.providers.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:98) at com.lumina.integration.mule.providers.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:61) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:196) Apparently the error is because of the Types.OTHER sql type. I know that this is an issue involving Jakarta dbutils package but maybe someone has already got this problem and found a workaround to this. At the Jakarta mailing list a workaround is mentioned by subclassing the QueryRunner class. In order to do that, I'll need to subclass the JDBC provider completely (the dispatcher and factory at least). Perhaps a custom QueryRunner could be injected to the JdbcMessageDispatcher in a future version. Regards, Juan Manuel

    MuleSoft JIRA | 1 decade ago | Juan Manuel Sanmarco
    java.sql.SQLException: Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)...
  3. 0

    Unique index or primary key violation when retrying a failed job

    GitHub | 2 years ago | drdee
    azkaban.executor.ExecutorManagerException: Error writing log part.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    cant get it working [#1428232] | Drupal.org

    drupal.org | 1 year ago
    org.drupal.project.async_command.exception.DatabaseRuntimeException: java.sql.SQLException: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' Query: UPDATE async_command SET output=?, id1=?, id2=?, id3=?, id4=?, number1=?, number2=?, number3=?, number4=?, string1=?, string2=?, string3=?, string4=?, status=?, control=?, message=?, weight=?, start=?, end=?, checkpoint=?, progress=? WHERE id=? Parameters: [null, 1, null, null, null, 0.0, 0.0, 0.0, 0.0, null, null, null, null, OKOK, null, Users: 0. Items: 0. (Time spent: 0h0m0s), 0, 1334338042, 1334338042, null, null, 5]
  6. 0

    GitHub comment 25#52516950

    GitHub | 2 years ago | StigLau
    net.whydah.identity.user.role.DatastoreException: java.sql.SQLException: Data truncated for column 'RoleID' at row 1 Query: INSERT INTO UserRoles (RoleID, UserID, AppID, OrganizationName, RoleName, RoleValues) values (?, ?, ?, ?, ?, ?) Parameters: [1a177656-f32a-458e-86f8-c23d301cafb1, useradmin, 1, Support, WhydahUserAdmin, 1]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Invalid column type Query: INSERT INTO FPA.ESPECIES (rest of the query here)...

      at org.apache.commons.dbutils.QueryRunner.rethrow()
    2. Apache Commons DbUtils
      QueryRunner.update
      1. org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330)
      2. org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:399)
      2 frames
    3. org.mule.providers
      JdbcMessageDispatcher.doDispatch
      1. org.mule.providers.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:98)
      1 frame
    4. com.lumina.integration
      JdbcMessageDispatcher.doSend
      1. com.lumina.integration.mule.providers.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:61)
      1 frame
    5. org.mule.providers
      AbstractMessageDispatcher.send
      1. org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:196)
      1 frame