JDBC用Oracle Universal Connection Poolの設定

Liferay Supportは、特定のサードパーティ製品を他の製品よりも推奨または承認するものではありません。 Liferayは、これらの製品に関して、ここに記載または参照されているいかなる指示に対しても責任を負いません。 これらの原則の実行は、加入者の責任において行われるものとします。

この記事は、Liferay Digital Experience Platform 7.0または7.1でJDBC用のOracleのUniversal Connection Poolを設定するための構成について説明します。

JDBC接続プール全般に関する情報は、Oracle公式ドキュメント を参照してください。

解決策

  1. Oracle Database のバージョンに応じた UCP コネクタ .jar をダウンロードし、Liferay 環境の /lib/ext ディレクトリに配置します。
  2. これらのプロパティを portal-ext.propertiesに含めます:
module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.el,\
        com.sun.el.*,\
        com.sun.image.*,\
        com.sun.jmx.*,\
        com.sun.jna,\
        com.sun.jndi.*,\
        com.sun.mail.*,\
        com.sun.management.*,\
        com.sun.media.*,\
        com.sun.msv.*,\
        com.sun.org.*,\
        com.sun.syndication,\
        com.sun.tools.*,\
        com.sun.xml.*,\
        com.yourkit.*,\
        sun.*,\
        oracle.*

上記のプロパティは、すべてのバンドルで利用可能なクラスを定義しています。

追加情報

正しいプロパティが設定されていない状態でJDBCプーリングを設定しようとすると、次のようなエラーが発生することがあります:

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 oracle
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: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:744)
Caused by: 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 oracle
この記事は役に立ちましたか?
1人中0人がこの記事が役に立ったと言っています