*_Background: _*
After working through the initial wave of getting the datasource
deployment for DB2 to function with Geronimo, we attempted to duplicate
the effort on a second workstation and have run into some interesting
behavior.
*_Problem: _*
We are unable to deploy the datasource successfully on a second Geronimo
workstation.
1) We copied the descriptor used from machine A to machine B along
with the db2/jars directory.
2) We ran the deploy command for the datasource.
a. The deploy command runs successfully but, we receive a stack
trace (pasted below) that indicates “class not found” for the driver and
the datasource is flagged as “failed” in the administrator console.
b. We inspected the classpath on the machine and all appears to be
in order
c. We examined the contents of the driver JAR file and it contains
a class and package name that corresponds to the named friver.
I don’t really know where to look at this point and I am at a loss to
explain the behavior…any ideas would be really helpful… J
*_Supporting Documentation: _*
Here is the command to execute the deployment:
deploy --user system --password manager deploy mc_db2_plan.xml
...\repository\tranql\rars\tranql-connector-1.1.rar
Here is the datasource descriptor xml (mc_db2_plan.xml) file we are
using on both machines:
<?xml version="1.0" encoding="UTF-8"?>
<connector configId="user/database-pool-MC_DB2_Test/1/car"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0">
<dep:dependency
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.0">
<dep:uri>db2/db2jcc/8.1.7/jar</dep:uri>
</dep:dependency>
<dependency>
<uri>db2/db2jcc/8.1.7/jar</uri>
</dependency>
<dependency>
<uri>db2/db2jcc_license_cu/8.1.7/jar</uri>
</dependency>
<dependency>
<uri>db2/db2jcc_license_cisuz/8.1.7/jar</uri>
</dependency>
<resourceadapter>
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
<connectiondefinition-instance>
<name>MC_DB2_Test</name>
<config-property-setting name="Password">ecom1</config-property-setting>
<config-property-setting
name="CommitBeforeAutocommit">false</config-property-setting>
<config-property-setting
name="Driver">*com.ibm.db2.jcc.DB2Driver*</config-property-setting>
<config-property-setting
ame="ExceptionSorterClass">org.tranql.connector.AllExceptionsAreFatalSorter</config-property-setting>
<config-property-setting name="UserName">ecom1</config-property-setting>
<config-property-setting
name="ConnectionURL">jdbc:db2://HODB2MISC01:50000/USER</config-property-setting>
<connectionmanager>
<local-transaction/>
<single-pool>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
</connector>
Here is the stack trace with the exception:
14:00:15,885 ERROR [GBeanInstanceState] Error while starting; GBean is
now in the FAILED state:
objectName="geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=user/database-pool-MC_DB2_Test/1/car,j2eeType=JCAManagedConnectionFactory,name=MC_DB2_Test"
*Unable to load driver class: com.ibm.db2.jcc.DB2Driver*
at
org.tranql.connector.jdbc.JDBCDriverMCF.setDriver(JDBCDriverMCF.java:147)
at
org.tranql.connector.jdbc.JDBCDriverMCF$$FastClassByCGLIB$$81f38179.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.DynamicGBeanDelegate$Operation.invoke(DynamicGBeanDelegate.java:181)
at
org.apache.geronimo.gbean.DynamicGBeanDelegate.setAttribute(DynamicGBeanDelegate.java:134)
at
org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper.setAttribute(ManagedConnectionFactoryWrapper.java:254)
at
org.apache.geronimo.gbean.runtime.GBeanAttribute$DynamicSetterMethodInvoker.invoke(GBeanAttribute.java:430)
at
org.apache.geronimo.gbean.runtime.GBeanAttribute.setValue(GBeanAttribute.java:403)
at
org.apache.geronimo.gbean.runtime.GBeanAttribute.inject(GBeanAttribute.java:334)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:925)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:325)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:110)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:132)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:537)
at
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:208)
at
org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans(Configuration.java:315)
at
org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b4a9b.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:173)
at
org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(ConfigurationManagerImpl.java:142)
at
org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:125)
at
org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
at
org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServerDelegate.java:117)
at
mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:219)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)
at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:99)
at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:31)
at
mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:90)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at
mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:86)
at
mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:80)
at $Proxy0.invoke(Unknown Source)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:221)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
*Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver*
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.tranql.connector.jdbc.JDBCDriverMCF.loadClass(JDBCDriverMCF.java310)
at
org.tranql.connector.jdbc.JDBCDriverMCF.setDriver(JDBCDriverMCF.java:144)
.... 62 more
*Francis A. Varin, M.S.*
*IT Architect II*
Corporate Information Systems
Amica Mutual Insurance Company
1-800-652-6422 ext. 24536
http://www.amica.com <http://www.amica.com/>
------------------------------------------------------------------------
* **********************************************************
This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify
[EMAIL PROTECTED]
and the sender of the message. Thank you.
********************************************************** *