thanks! I have hust changed the PersonID an ProjectID in my PersonProject class, but now comes the other error:-(
new code:
private Person person;
private Project project;
with getter and setters
****************
new mapping:
<many-to-one name="project" column="PROJECTID" class="mapping.Project"/>
<many-to-one name="person" column="PERSONID" class="mapping.Person"/>
**********************
16:22:36,911 DEBUG JDBCExceptionReporter:63 - Could not execute JDBC batch update [insert into TMP_PERS_PROJ (ROLENAME, PROJECTID, PERSONID, PERSPROJID) values (?, ?, ?, ?)]
com.sap.dbtech.jdbc.exceptions.BatchUpdateExceptionSapDB: [-9041]: System error: BD Index not accessible(input position 2)
at com.sap.dbtech.jdbc.CallableStatementSapDB.executeBatch(CallableStatementSapDB.java:608)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at dao.AccessMethods.addPersonToProject(AccessMethods.java:81)
at dao.testMain.main(testMain.java:51)
16:22:36,911 WARN JDBCExceptionReporter:71 - SQL Error: -9041, SQLState: S9041
16:22:36,911 ERROR JDBCExceptionReporter:72 - [-9041]: System error: BD Index not accessible(input position 2)
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at dao.AccessMethods.addPersonToProject(AccessMethods.java:81)
at dao.testMain.main(testMain.java:51)
Caused by: com.sap.dbtech.jdbc.exceptions.BatchUpdateExceptionSapDB: [-9041]: System error: BD Index not accessible(input position 2)
at com.sap.dbtech.jdbc.CallableStatementSapDB.executeBatch(CallableStatementSapDB.java:608)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
... 9 more
16:22:36,911 ERROR AbstractFlushingEventListener:301 - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
|