0

I´m using hibernate in my web project. I have also set to true the <property name="hibernate.show_sql" value = "true" /> in order to show the SQL logs

It works fine; I can see the logs and the commands executed. But every now and then some SQL statements fails due to error in my code.

The problem is that these errors are not shown in the output window.

Example

LOG

Hibernate: create table abcdefghijklmnaaaaaaaaaaaaaaaaaaaaaaa (uniqueId number(10,0) not null, accepted number(3,0) not null, simulationId number(10,0), primary key (uniqueId))

Executing this statement directly in oracle database

*Cause: An identifier with more than 30 characters was specified.

Any idea of how can I print not only the SQL statement, but the result message returned by the database?

1

1 Answer 1

1

Exception that is thrown has message from database, you need to log it or print it in console or whatever you want to do with it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.