Search code examples
javahibernateloggingnuxeo

Enable Hibernate "show_sql" for a Nuxeo installation


I want to see why my Nuxeo installation is failing when I point its SQL user directory to other database (Oracle says: table/view doesn't exists). I want to enable show_sql Hibernate parameter to see the sql in the console.. but I don't know where I can do it (if I can).


Solution

  • You can set in your persistance xml like this:

    ...
    <property name="properties">
                <value>
                    hibernate.hbm2ddl.auto=...
                    hibernate.show_sql=true
    
                    hibernate.dialect=...
                    hibernate.connection.driver_class=...
                    hibernate.connection.url=...
                    hibernate.connection.username=...
                    hibernate.connection.password=...
    
                </value>
    </property>
    ...