留言板

Apache Derby/JavaDB RDBMS fails

Chris Barham,修改在7 年前。

Apache Derby/JavaDB RDBMS fails

New Member 发布: 1 加入日期: 16-9-24 最近的帖子
Hi,
I configured Liferay 7 to use Apache Derby/JavaDB as the RDBMS, but it fails on startup. Hibernate has selected the correct dialect, however Liferay has selected DB2 which stops the system booting and prints an error regarding unsupported database "DB2" - has anyone come across this before?

Derby setup steps followed for Liferay 7 - https://web.liferay.com/community/wiki/-/wiki/Main/Derby%20Java%20DB%20RDBMS

Here's the line of code that fails:
https://github.com/liferay/liferay-portal/blob/2960360870ae69360861a720136e082a06c5548f/portal-impl/src/com/liferay/portal/dao/db/DBManagerImpl.java#L112

relevant stack trace snippet:


13:22:33,409 INFO  [localhost-startStop-1][DialectDetector:75] Determine dialect for Apache Derby 10.12
13:22:33,496 INFO  [localhost-startStop-1][DialectDetector:148] Found dialect org.hibernate.dialect.DerbyDialect
24-Sep-2016 13:22:33.589 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
 java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'counterHibernateSessionFactory' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Unsupported database type db2
	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:256)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	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:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


Cheers,
Chris
thumbnail
David H Nebinger,修改在7 年前。

RE: Apache Derby/JavaDB RDBMS fails

Liferay Legend 帖子: 14918 加入日期: 06-9-2 最近的帖子
It would appear by looking at the provided factory instances in the same package that Derby is no longer a supported database.

Since it doesn't have a factory, it's not supported, but since Derby is free, you might want to open a ticket on http://issues.liferay.com to report it.

BTW, just because the old wikis from 5.2 and 6.0 say something should work, you have to remember they were writing about 5.2 and 6.0, not Liferay 7. There's lots of stuff in those old wikis that either do not apply or require some modification to apply to 7.0.





Come meet me at the LSNA!