Hi All, I have a CMP entity bean using an existing table in SapDB. When I try to create I'm getting this error. My EJBCreate routine was using the Sequence Block pattern to create the Integer PK which I suspected as the problem so I changed the create method to hardcode a PK as in
this.eventId = new Integer(21); My ejb-jar.xml has the following: <cmp-field> <field-name>eventId</field-name> </cmp-field> <primkey-field>eventId</primkey-field> My jaws.xml has the following: <cmp-field> <field-name>eventId</field-name> <column-name>EVENT_ID</column-name> <sql-type>INTEGER</sql-type> <jdbc-type>INTEGER</jdbc-type> </cmp-field> An excerpt from the server.log follows: [JAWS] Create, id is null [DefaultDS] Resource 'org.jboss.pool.jdbc.xa.wrapper.XAResourceImpl@2cd19d' enlisted for 'org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@50988'. [DefaultDS] Pool DefaultDS [1/2/10] gave out pooled object: org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@50988 [JAWS] Exists command executing: SELECT COUNT(*) FROM PID_EVENTS WHERE EVENT_ID=? [JAWS] Set parameter: idx=1, jdbcType=INTEGER, value=NULL [JAWS] Create command executing: INSERT INTO PID_EVENTS (EVENT_ID,SECOND_COUNT,EVENT_TYPE,SEVERE_EVENT_SECONDS,EVENT_SECONDS,SERIAL_ NUMBER,COUNT,UNAVAILABLE_SECONDS,CONSECUTIVE_SEVERE_EVENT_SECONDS) VALUES (?,?,?,?,?,?,?,?,?) [JAWS] Set parameter: idx=1, jdbcType=INTEGER, value=NULL [JAWS] Set parameter: idx=2, jdbcType=INTEGER, value=0 [JAWS] Set parameter: idx=3, jdbcType=VARCHAR, value=abc [JAWS] Set parameter: idx=4, jdbcType=INTEGER, value=0 [JAWS] Set parameter: idx=5, jdbcType=INTEGER, value=0 [JAWS] Set parameter: idx=6, jdbcType=VARCHAR, value=test1234 [JAWS] Set parameter: idx=7, jdbcType=INTEGER, value=0 [JAWS] Set parameter: idx=8, jdbcType=INTEGER, value=0 [JAWS] Set parameter: idx=9, jdbcType=INTEGER, value=0 [JAWS] com.sap.dbtech.jdbc.exceptions.DatabaseException: SAP DBTech SQL: [-5005] Missing non-NULL value [JAWS] at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:51) [JAWS] at com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:630) [JAWS] at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:324) [JAWS] at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:265) [JAWS] at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.ja va:309) [JAWS] at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.ja va:258) [JAWS] at com.sap.dbtech.jdbc.CallableStatementSapDB.executeUpdate(CallableStatementSa pDB.java:535) [JAWS] at org.jboss.pool.jdbc.PreparedStatementInPool.executeUpdate(PreparedStatementI nPool.java:82) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleR esult(JDBCUpdateCommand.java:49) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160 ) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn tityCommand.java:136) [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten ceManager.java:128) --snip-- It appears that when JAWS attempts to get the value of the field eventId it finds null even though I assigned a new Integer to it in my EJBCreate() method. I searched the archives for any problems like this and didn't find anything exactly like it. Thanks for any help, Mike _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user