Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 启用休眠”;显示“U sql”;对于Nuxeo安装_Java_Hibernate_Logging_Nuxeo - Fatal编程技术网

Java 启用休眠”;显示“U sql”;对于Nuxeo安装

Java 启用休眠”;显示“U sql”;对于Nuxeo安装,java,hibernate,logging,nuxeo,Java,Hibernate,Logging,Nuxeo,我想知道,当我将Nuxeo的SQL用户目录指向其他数据库时(Oracle说:表/视图不存在),为什么我的Nuxeo安装失败了。我想启用show_sql Hibernate参数以查看控制台中的sql。。但是我不知道我在哪里可以做到(如果我可以的话)。您可以像这样在持久性xml中设置: ... <property name="properties"> <value> hibernate.hbm2ddl.auto=...

我想知道,当我将Nuxeo的SQL用户目录指向其他数据库时(Oracle说:表/视图不存在),为什么我的Nuxeo安装失败了。我想启用show_sql Hibernate参数以查看控制台中的sql。。但是我不知道我在哪里可以做到(如果我可以的话)。

您可以像这样在持久性xml中设置:

...
<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>
...
。。。
hibernate.hbm2ddl.auto=。。。
hibernate.show_sql=true
hibernate.dialogue=。。。
hibernate.connection.driver\u class=。。。
hibernate.connection.url=。。。
hibernate.connection.username=。。。
hibernate.connection.password=。。。
...

如果您无法从安装中访问持久性xml,可以尝试使用p6spy之类的工具。它记录应用程序执行的所有查询。另一个选项是在oracle安装上启用查询日志记录。

您遵循了吗

关于您的问题,您应该能够使用hibernate.properties文件

如果您使用Nuxeo 5.3.2+、Oracle模板和JBoss,那么下面是文件:$NXSERVER/templates/Oracle/Nuxeo.ear/hibernate.properties。使用Tomcat,我认为路径应该是$NXSERVER/templates/oracle/NXSERVER/hibernate.properties

此外,您可能需要增加hibernate日志编辑log4j配置