java torque save method exception

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yoav
    New Member
    • Sep 2008
    • 5

    java torque save method exception

    Hello,
    I have a problem with an application I have been developing that uses java torque.
    When I try to save a specific table content (table name is US),like this:
    US.setXXX (value) ( XXX is the columns name, value is the value to put.type is INTEGER),then I do US.save ( ),I get an exception.
    More specificly,the exception is thrown when invoking currentConnecti on.
    I will also state that I have tried to drop some columns that were not in the torque files,but it still didnt help.
    Any help would be greatly appriciated.
    Thanks in advanced,
    Yoav
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Perhaps if you post the trace of the exception that you are getting ...

    Comment

    • Yoav
      New Member
      • Sep 2008
      • 5

      #3
      DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPAC EID=6, TABLEID=9, COLNO=0, DRIVER=3.50.152
      is the tarce.
      I guess that torque is trying to put null to not null columns.
      the thing is that:I have changed the columns in my db2 to nullable,and indeed SQL queries are successful in putting null.but torque still thinks they are unnullable,beca use the change was only in the database....
      my question is,how to make torque know that too?are there any variables indicating that?
      Thanks in advanced,
      Yoav

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by Yoav
        DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPAC EID=6, TABLEID=9, COLNO=0, DRIVER=3.50.152
        is the tarce.
        I guess that torque is trying to put null to not null columns.
        the thing is that:I have changed the columns in my db2 to nullable,and indeed SQL queries are successful in putting null.but torque still thinks they are unnullable,beca use the change was only in the database....
        my question is,how to make torque know that too?are there any variables indicating that?
        Thanks in advanced,
        Yoav
        You might have to check the documentation to see how to regenerate the Java code after making table changes.
        Perhaps this page will help somewhat in that respect.

        Comment

        Working...