Reputation: 3041
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?
Upvotes: 0
Views: 74
Reputation: 1900
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.
Upvotes: 1