legacy-knowledge-base
Publicado Sep. 25, 0005

Configuring the Oracle Universal Connection Pool for JDBC

written-by

default-service-account default-service-account

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text
Liferay Support does not recommend or endorse specific third-party products over others. Liferay is not responsible for any instructions herein or referenced regarding these products. Any implementation of these principles is the responsibility of the subscriber.

This article documents configurations to setup Oracle's Universal Connection Pool for JDBC in Liferay Digital Experience Platform 7.0 or 7.1.

For information on JDBC connection pooling in general, please refer to official Oracle documentation.

Resolution

  1. Download the UCP connector .jar for your version of Oracle Database and place it in the Liferay environment's /lib/ext directory.
  2. Include these properties to your 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.*

The above properties defines the classes that are available to every bundle.

Additional Information

Attempting to setup JDBC pooling without the correct properties set may lead to the following errors:

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
did-this-article-resolve-your-issue

legacy-knowledge-base