1 Reply Latest reply on Sep 1, 2005 2:18 AM by Fairoz Sharif

    cannot save it to database

    Fairoz Sharif Newbie

      i have cmp bean description is as follows

      <ejb-name>AddressBook</ejb-name>

      <cmp-field>
      <field-name>name</field-name>

      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>

      </cmp-field>
      <cmp-field>
      <field-name>bookId</field-name>
      <auto-increment/>
      </cmp-field>
      <entity-command name="hsqldb-fetch-key"/>


      when i creating this by home.create

      this is log message
      2005-09-01 11:04:14,197 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.PowerUser] Executing SQL: SELECT name, email, address, phone, nickname, password, TID FROM POWERUSER WHERE (PId=?)
      2005-09-01 11:04:14,197 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.PowerUser] load relation SQL: SELECT allId FROM ALLADDRESSBOOK WHERE (PID=?)
      2005-09-01 11:04:14,207 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.AllAddressBook] load relation SQL: SELECT bookId FROM ADDRESSBOOK WHERE (allID=?)
      2005-09-01 11:04:14,207 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCHsqldbCreateCommand.AddressBook] Executing SQL: INSERT INTO ADDRESSBOOK (name, description, allID) VALUES (?, ?, ?)
      2005-09-01 11:04:14,207 ERROR [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCHsqldbCreateCommand.AddressBook] Could not create entity
      java.sql.SQLException: Try to insert null into a non-nullable column: column: BOOKID table: ADDRESSBOOK in statement [INSERT INTO ADDRESSBOOK (name, description, allID) VALUES (?, ?, ?)]


      can any one suggest what is the problem