开发者

Enable Hibernate "show_sql" for a Nuxeo installation

I want to see why my Nuxeo installation i开发者_高级运维s 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).


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>
...


Did you follow http://doc.nuxeo.com/display/KB/Configuring+Oracle ?

About your question, you should be able to use the hibernate.properties file.

If you use Nuxeo 5.3.2+, Oracle template and JBoss, here is the file: $NXSERVER/templates/oracle/nuxeo.ear/hibernate.properties. Using Tomcat, I think the path will be $NXSERVER/templates/oracle/nxserver/hibernate.properties.

Also, you may need to increase the hibernate logs editing log4j configuration.


If you don't have access to the persistence xml from your installation, you could try using a tool like p6spy. It logs all the queries that are performed by your application. The other option is to enable query logging on your oracle installation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜