Liferay 7 hibernate方言不兼容问题

时间:2016-06-27 20:09:36

标签: java hibernate liferay liferay-7

我下载了 Liferay-7 Tomcat软件包并使用了Oracle 11g数据库。我尝试添加 ojdbc6_g.jar,ojdbc14.jar classes12.jar 但没有任何效果。每次因为不兼容的hibernate方言而得到NullPointerException。

13:54:47,634 INFO  [Start Level: Equinox Container: 00717612-6e3c-0016-1f0e-a5e81700fe44][node:410] [Inferno] closed
13:55:57,206 INFO  [localhost-startStop-1][DialectDetector:75] Determine dialect for Oracle 11.2
13:55:57,273 INFO  [localhost-startStop-1][DialectDetector:148] Found dialect org.hibernate.dialect.Oracle10gDialect
13:55:57,529 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
java.lang.NullPointerException
    at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:132)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
13:55:57,531 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
java.lang.NullPointerException
    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:53)
    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:139)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
13:55:57,542 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.IllegalStateException: The system has not be activated yet.
java.lang.IllegalStateException: The system has not be activated yet.
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.setStartLevel(ModuleContainer.java:1442)
    at com.liferay.portal.bootstrap.ModuleFrameworkImpl.stopRuntime(ModuleFrameworkImpl.java:515)

2 个答案:

答案 0 :(得分:1)

Liferay7 CE不支持oracle(和其他商业dbs)。检查this article和支持的dbs列表的引用以及再次添加oracle支持的方法,或者尝试支持商业数据库的Liferay dxp。

答案 1 :(得分:1)

您可以实际使用其他数据库,但需要自定义实现。查看本文了解oracle数据库。它对我有用。 https://www.dontesta.it/en/2016/04/13/liferay-7-ce-how-to-add-support-for-oracle-db/