WEBSPHERE 集群 配置JDBC问题求助
环境
我 有三台 WINDOS 机器 装了WAS6.0 还有一台AIX 装DB2 9
managerCellManager01 6.0.0.1 TCP
rac1Node01 6.0.0.1 TCP
rac2Node01 6.0.0.1 TCP
集群和 节点状态都正常
单元
cluster
节点
rac1Node01(6.0.0.1)
集群成员
rac1
rac2Node01(6.0.0.1)
集群成员
rac2
WebSphere 变量
集群
APP_INSTALL_ROOT ${USER_INSTALL_ROOT}/installedApps cells:managerCell01:clusters:cluster
CONNECTJDBC_JDBC_DRIVER_PATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
CONNECTOR_INSTALL_ROOT ${USER_INSTALL_ROOT}/installedConnectors cells:managerCell01:clusters:cluster
DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
DB2UNIVERSAL_JDBC_DRIVER_PATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
DB2_JDBC_DRIVER_PATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
DEPLOY_TOOL_ROOT ${WAS_INSTALL_ROOT} /deploytool/itp cells:managerCell01:clusters:cluster
DERBY_JDBC_DRIVER_PATH ${WAS_INSTALL_ROOT} /derby/lib cells:managerCell01:clusters:cluster
DRIVER_PATH ${WAS_INSTALL_ROOT} cells:managerCell01:clusters:cluster
LOG_ROOT ${USER_INSTALL_ROOT} /logs cells:managerCell01:clusters:cluster
MQ_INSTALL_ROOT ${WAS_INSTALL_ROOT} /lib/WMQ cells:managerCell01:clusters:cluster
JDBC 提供者 > DB2 Universal JDBC Driver Provider > 数据源 > DB2 Universal JDBC Driver DataSource > J2EE 连接器体系结构(J2C)认证数据条目
JDBC 提供者 > DB2 Universal JDBC Driver Provider > 数据源 > DB2 Universal JDBC Driver DataSource
都配置了 ,这 应该不会有问题
数据库 没问题
db2 => connect to db2
Database Connection Information
Database server = DB2/AIX64 9.1.0
SQL authorization ID = DB2INST1
Local database alias = DB2
我在AIX 装了 WEBSPHERE 6.1 单机连 DB2 OK
消息
在节点 db2Node01 上的服务器 server1 上,对数据源 DB2 Universal JDBC Driver DataSource 执行的测试连接操作是成功的。
最后测试连接数据库 报错信息
消息
在节点 rac1Node01 上的服务器 nodeagent 上,数据源 DB2 Universal JDBC Driver DataSource 的测试连接由于以下异常 java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2ConnectionPoolDataSource 而失败。 查看 JVM 日志 获取进一步的详细信息。
在节点 rac2Node01 上的服务器 nodeagent 上,数据源 DB2 Universal JDBC Driver DataSource 的测试连接由于以下异常 java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2ConnectionPoolDataSource 而失败。 查看 JVM 日志 获取进一步的详细信息
at java.net.URLClassLoader.findClass(URLClassLoader.java:375)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.loadDataSourceClass(DSConfigurationHelper.java:1347)
at com.ibm.ws.rsadapter.DSConfigurationHelper$7.run(DSConfigurationHelper.java:204
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.testConnectionForGUI(DSConfigurationHelper.java:2046)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnectionToDataSource2(DataSourceConfigHelperMBean.java:52
at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnection(DataSourceConfigHelperMBean.java:456)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1366)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1012)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:233)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:12
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:12
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:12
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:167)
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1249)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:901)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:817)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:325)
at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:193)
at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:641)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:469)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.net.URLClassLoader.findClass(URLClassLoader.java:375)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.Class.forName0(Native Method)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.Class.forName(Class.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.rsadapter.DSConfigurationHelper.loadDataSourceClass(DSConfigurationHelper.java:1347)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.rsadapter.DSConfigurationHelper$7.run(DSConfigurationHelper.java:204
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.rsadapter.DSConfigurationHelper.testConnectionForGUI(DSConfigurationHelper.java:2046)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnectionToDataSource2(DataSourceConfigHelperMBean.java:52
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnection(DataSourceConfigHelperMBean.java:456)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
[07-11-16 11:02:48:484 CST] 0000003f SystemErr R at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1366)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1012)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:233)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
[07-11-16 11:02:48:500 CST] 0000003f SystemErr R at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:167)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
db的驱动最好每个 AppSrv 都放上,并指定路径
你的错应该就是驱动class 找不到的错误
感觉was 的使用还不是很难的,当然只是用起来
性能优化啥都还没研究过
谢谢上面这位哥们 我 把 JDBC 驱动 拷贝到 另外两台节点机,并设置 好环境变量 测试就通过了.
一开始 我只在 DM机器上 创建的 是 集群 环境变量,所以节点机器找不到 JDBC 驱动 .测试老报那错.
我没看明白,请教一下,你部署应用的服务器上,创建的数据源还是在dm上创建的数据源?好像在dm上创建的数据源比较有问题。你在每个应用上单独创建数据源
websphere调用jdbc包找不到路径,修改为本机的路径吧
没看到具体环境,不好查找问题。
我测试过 在AIX 上装DB2 和 websphere, 环境变量这样配置是没问题的.因为都在本地.同一台机器上. 而 集群安装后 就不行了 报异常 java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2ConnectionPoolDataSource
重起过 三台机器都重起了
是不是 DB2UNIVERSAL_JDBC_DRIVER_PATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
DB2_JDBC_DRIVER_PATH /home/db2inst1/sqllib/java cells:managerCell01:clusters:cluster
是不是这个有问题
/home/db2inst1/sqllib/java 在DB2上
是不是要把 /home/db2inst1/sqllib/java 复制到 WEBSPHERE 机器上?
你配置完datasource之后重启过环境没有?