JDBC class path not defined exception
If you are using a database or property extension repository for which the JDBC class path variable is not defined, you might encounter the following exception when you start WebSphere Application Server.
Problem
The UndefinedVariableException occurs as shown in the following virtual member manager trace sample:
Loading JDBC driver class: com.ibm.db2.jcc.DB2Driver
Getting ${VMM_JDBC_CLASSPATH} using variable map...
Failed to retrieve WAS variable: VMM_JDBC_CLASSPATH
com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable VMM_JDBC_CLASSPATH
at com.ibm.ws.runtime.component.VariableMapImpl.expand(VariableMapImpl.java:373)
at com.ibm.ws.runtime.component.VariableMapImpl.expand(VariableMapImpl.java:325)
at com.ibm.ws.wim.dao.DAOHelper.loadJDBCClass(DAOHelper.java:111)
at com.ibm.ws.wim.dao.AbstractDAO.loadJDBCClass(AbstractDAO.java:324)
at com.ibm.ws.wim.dao.AbstractDAO.getDirectAccessConnection(AbstractDAO.java:339)
at com.ibm.ws.wim.config.ConfigValidator.validateDBParams(ConfigValidator.java:285)
at com.ibm.ws.wim.config.ConfigValidator.validateRepositoryParams(ConfigValidator.java:214)
Solution
Define the VMM_JDBC_CLASSPATH variable
in the WebSphere Application Server configuration by completing the
following steps:
- Start the WebSphere Application Server administrative console.
- Click .
- In the Scope section, select Cell from the drop-down list.
- Click New to create a new variable.
- In the Name field, enter VMM_JDBC_CLASSPATH.
- In the Value field, enter the path to the JDBC driver library files separated by a colon (:) for UNIX or Linux or a semicolon (;) for Windows. For example, the path to Linux or UNIX is as follows: /opt/IBM/SQLLIB/java/db2jcc.jar:/opt/IBM/SQLLIB/java/db2jcc_license_cu.jar.
- Click OK.
- Additionally, copy the specified JDBC driver library files in the ${WAS_HOME}/lib directory of each installed WebSphere Application Server node.
- Save the configurations, and restart WebSphere Application Server. Note: In a clustered environment, you must also stop and restart the Deployment manager and the node agents.