Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

BIX cannot connect to the database when run from command line

SA-6615

Summary



When running BIX 7.1.7 from the command line, an error is encountered stating that it cannot connect to the database.

Error Messages



D:\BIX_MOM_Pega7>java -Xms128m -Xmx256m -cp .;lib\prbootstrap.jar;lib\prdbcp.jar;lib\rt.jar;lib\db2jcc.jar;lib\d
b2jcc_license_cu.jar;lib\jsr94-1.0.jar; -Dcom.pega.pegarules.bootstrap.properties.url=\config\prbootstrap.properties -Dpegarules.con
fig=\config\prconfig.xml -Dpega.prbootstrap.config=\config\prbootstrap.properties -Dpegarules.logging.configuration=\config\prloggin
g.xml -Dcom.pega.pegarules.bootstrap.ignorejndi=true com.pega.pegarules.pub.PegaRULES com.pega.pegarules.data.internal.access.Extrac
tImpl -i ABC-CLAIMS-NA-US-WORK-COVERAGE!DMOEXTRACTCSV,ABC-CLAIMS-NA-US-WORK-CONTACTS-MEDICARE!DMOEXTRACTCSV -t 2 -a BIXUser
-p bixuser
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource
19830421: Loading bootstrap properties from \config\prbootstrap.properties
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, skipping prconfig setting lookup
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prbootstrap in the local JNDI context, skipping prconfig setting lookup
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prconfig/ in the local JNDI context, skipping prconfig setting lookup
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prconfig in the local JNDI context, skipping prconfig setting lookup
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource
19830421: Bootstrap datatables schema: null
Feb 17, 2015 2:19:13 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource
SEVERE: Unable to connect to database.  Will only use properties from file.
com.pega.pegarules.configdbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.ibm.db2.jcc.DB2Driver'
        at com.pega.pegarules.configdbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
        at com.pega.pegarules.configdbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:520)
        at com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource.getBootstrapPropertiesFromDB(PRBootstrapDataSource.java:616)
        at com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource.getBootstrapPropertiesFromDB(PRBootstrapDataSource.java:599)
        at com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource.getBootstrapProperties(PRBootstrapDataSource.java:576)
        at com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource.getBootstrapProperties(PRBootstrapDataSource.java:570)
        at com.pega.pegarules.internal.bootstrap.PRBootstrap.<clinit>(PRBootstrap.java:190)
        at com.pega.pegarules.pub.PegaRULES.main(PegaRULES.java:85)
Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.pega.pegarules.configdbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:737



Steps to Reproduce



Run BIX script from the command line adding all of the libraries to the classpath.


Root Cause



The root cause of this problem is software use/operation error. The driver jar file listed in the BIX script does not match the one that is actually present inside the \lib folder.


Resolution



This issue is resolved by making the following change to the PRPC operating environment: Change the script to reference the correct database driver jar file viz lib\db2jcc4.jar so that the classpath is set correctly for the command line execution.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us