cancel
Showing results for 
Search instead for 
Did you mean: 

HANA nJDBC issue in JPA application

former_member185086
Active Contributor
0 Kudos

Hi,

We are in HANA version SP09 1.00.094.00.1427101515 and migrating our DB2 DB to HANA DB where we have few JPA and JDBC based application , in JPA application when we try to perform Insert statement its ends with strange error as given here :

Caused by: com.sap.db.jdbc.exceptions.jdbc40.SQLTransactionRollbackException: [129]: transaction rolled back by an internal error: cannot change this transaction's access mode from read-only to update directly: please use "SET TRANSACTION READ WRITE" statement first

Do we have any annotation in JPA where we can instruct container to handles the above transaction behaviour ?


Also does njdbc have versions w.r.t. specific HANA DB ?


Please help.

Best Regards,

Satish Kumar

Accepted Solutions (1)

Accepted Solutions (1)

former_member185086
Active Contributor
0 Kudos

Hi,

Adding Datasource property as readonly=false is working.

Thanks,

Satish Kumar

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Could it be that the user account you're using for the JDBC access is a restricted user?

- Lars

former_member185086
Active Contributor
0 Kudos

Hi,

Thanks for reply, I checked this communication user has access to that catalog object with CREATE ANY privileges. is this sufficient ?

Regards,

Satish Kumar