Old style outer join (+) cannot be used with ANSI joins, Oracle Database Error Code ORA-25156

Viewed 616

Why I get this error even though i specified the hibernate.dialect as OracleDialect. If you recommend to use oracle10gDialect or Oracle9iDialect please explain, cause Hibernate can find the Dialect using JDBC meta data when it connect to the db in very first time. Correct me if i'm wrong.

1 Answers

I believe your problem is to find the correct dialect. But I believe this is part of the configuration. This is not a programming problem, This is a configuration strategy that you used to manipulate or use of configuration.

  1. you can externalize the configuration with multiple profiles such as dev, UAT, PROD which is based on the environment. Then your CICD the pipeline will pick the correct profile which has the correct dialect according to the deployed environment.
  2. Or you can add default dialect and override the properties based on the environment in which the application is deployed.

The reason is application is the component where looking for the database.

or check this post if you wanted to do programmatically ( I haven't try this) : Is there a way to detect SQL Dialect without knowing the database type?

Also please read the driver specification and JPA dialect usage. some databases expect exact versions of dialect to support full functionality.

Related