Getting this error after upgrading spring to 3.1.5 version & java 17 from 2.x with & java 8.
DB connection is okay and all queries are executed as expected except for repository.save() query
Added logs to capture query issue and this below query was logged
select next_val as id_val from track_SEQ for update
here I do not have a table name called as track_SEQ not sure from where it is created
Actual table name – > track
this is my application.properties file
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect logging.level.org.hibernate.SQL=DEBUG
spring.security.user.name=root spring.security.user.password=root spring.main.allow-bean-definition-overriding=true server.port = ****
And this is my db.properties file
datasource.driver-class-name =com.microsoft.sqlserver.jdbc.SQLServerDriver datasource.jdbc- url=jdbc:sqlserver://****;databaseName=DB_Name;SelectMethod=Cursor; datasource.username = username datasource.password = *******
previously got this below error
Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
solved it by adding SelectMethod=Cursor;
in datasource.jdbc-url ,post which started getting
could not read a hi value
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name ‘track_SEQ’.
Dikshith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.