Message Boards

Db2 connectivity issue with liferay 7.3

thumbnail
Shiva Lingam K, modified 2 Years ago.

Db2 connectivity issue with liferay 7.3

New Member Posts: 18 Join Date: 5/9/18 Recent Posts

Hi,

I was unable to connect with the Db2 server(com.ibm.db2.jcc4.DB2Driver) with Liferay 7.3 server.

I added the below-mentioned jars in the LiferayHome/tomcat/lib/ext folder.

When I deploy the code showing the below error.

Error Occured While Getting the Connection: - java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver cannot be found by test_1.0.0
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver cannot be found by test_1.0.0.


 

db2.DAO.driver=com.ibm.db2.jcc.DB2Driver
db2.DAO.dbURL=jdbc:db2://...
db2.DAO.username=...
db2.DAO.password=...
 

Please help me to resolve this issue.

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Db2 connectivity issue with liferay 7.3

Liferay Legend Posts: 6396 Join Date: 9/23/08 Recent Posts

Note: Liferay Portal 7.3 CE does not support DB2 at all - unless you use Antonio Musarra's extension. You'll need to do a bit more than just copying drivers - or, alternatively, consider using Liferay DXP, which supports DB2

thumbnail
Shiva Lingam K, modified 2 Years ago.

RE: RE: Db2 connectivity issue with liferay 7.3

New Member Posts: 18 Join Date: 5/9/18 Recent Posts

Hi,

I am using Liferay DXP (liferay-dxp-7.3.10.1-sp1). Getting the same issue mentioned below.

java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver cannot be found by com.test.1.0.0.

Could you please help me out to resolve this issue?

Copied the below jars in tomcat/lib/ext folder.

db2jcc4.jar
db2jcc_license_cisuz.jar

thumbnail
Shiva Lingam K, modified 2 Years ago.

RE: Db2 connectivity issue with liferay 7.3

New Member Posts: 18 Join Date: 5/9/18 Recent Posts

Hi, below is the answer which works.

Add these properties in the portal-ext.properties file.

module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.liferay.aspectj,\
        com.liferay.aspectj.*,\
        com.liferay.expando.kernel.model,\
        com.liferay.portal.servlet.delegate,\
        com.liferay.portal.servlet.delegate*,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.image.*,\
        com.sun.imageio.plugins.*,\
        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.*,\
        jdk.*,\
        sun.*,\
        weblogic.jndi,\
        weblogic.jndi.*,\
        com.ibm.*