Hibernate: select post0_.post_id as post_id1_1_, post0_.added_date as added_date2_1_, post0_.category_id as category_id6_1_, post0_.content as content3_1_, post0_.image_name as image_name4_1_, post0_.post_title as post_title5_1_, post0_.user_id as user_id7_1_ from posts post0_ fetch first ? rows only
2022-05-27 15:54:49.431 WARN 22616 --- [nio-9191-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 933, SQLState: 42000
2022-05-27 15:54:49.431 ERROR 22616 --- [nio-9191-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : ORA-00933: SQL command not properly ended
2022-05-27 15:54:49.433 ERROR 22616 --- [nio-9191-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
oracle.jdbc.OracleDatabaseException: ORA-00933: SQL command not properly ended
CodePudding user response:
Try to specific column names in entities:
@Column(name = "POST_ID1_1_")
private Long postId
CodePudding user response:
Set correct dialect for database (application.properties). Try with:
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect