database-platform: .hibernate.dialect.OracleDialect
when im using oracle dialect i got error here is my pagination
Pageable pageable = PageRequest.of(page, size);
Page<Rate> rates = rateRepository.findAll(pageable);
my springboot version is 3.4.0 java version 17
here is what exception im getting postman when im trying to paginate
.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL
when im trying to use oracle12cdialect im getting no class found error
Pageable pageable = PageRequest.of(page, size);
Page<Rate> rates = rateRepository.findAll(pageable);
my springboor version is 3.4.0 java version 17
here is what exception i getin postman when i trying to paginate
.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL [select r1_0.rate_id,r1_0ments,r1_0.created_at,r1_0.rating_star,r1_0.remote_address,r1_0.updated_at from ms_web_rate r1_0 offset ? rows fetch first ? rows only] [ORA-00933: SQL command not properly ended\n\r\n/] [n/a]; SQL [n/a]",
database-platform: .hibernate.dialect.OracleDialect
when im using oracle dialect i got error here is my pagination
Pageable pageable = PageRequest.of(page, size);
Page<Rate> rates = rateRepository.findAll(pageable);
my springboot version is 3.4.0 java version 17
here is what exception im getting postman when im trying to paginate
.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL
when im trying to use oracle12cdialect im getting no class found error
Pageable pageable = PageRequest.of(page, size);
Page<Rate> rates = rateRepository.findAll(pageable);
my springboor version is 3.4.0 java version 17
here is what exception i getin postman when i trying to paginate
.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL [select r1_0.rate_id,r1_0ments,r1_0.created_at,r1_0.rating_star,r1_0.remote_address,r1_0.updated_at from ms_web_rate r1_0 offset ? rows fetch first ? rows only] [ORA-00933: SQL command not properly ended\n\r\nhttps://docs.oracle/error-help/db/ora-00933/] [n/a]; SQL [n/a]",
1 Answer
Reset to default 0Try just using
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
no need to specify .hibernate.dialect anymore, the metadata of the database should be accessed to determine the capabilities, and thus not using "offset ... rows fetch ..." if not yet available.
oracle12cdialect
but you haven't said which database version you are using. The row limiting syntax with offset/fetch is only available from 12cR1 (12.1) onwards - so are you maybe working with an 11g (or even earlier) database - where it will get that error? – Alex Poole Commented Feb 17 at 16:11