Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 91286 invoked from network); 20 Apr 2006 03:46:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2006 03:46:05 -0000 Received: (qmail 69003 invoked by uid 500); 20 Apr 2006 03:46:03 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 68955 invoked by uid 500); 20 Apr 2006 03:46:03 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 68944 invoked by uid 99); 20 Apr 2006 03:46:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 20:46:02 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [63.208.196.171] (HELO outbound.mailhop.org) (63.208.196.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 20:46:02 -0700 Received: from cpe-071-070-252-011.nc.res.rr.com ([71.70.252.11] helo=[192.168.1.5]) by outbound.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.51) id 1FWQ6u-0000lv-RK for user@geronimo.apache.org; Wed, 19 Apr 2006 23:45:41 -0400 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 71.70.252.11 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: hogndos Message-ID: <444703E4.2000908@hogstrom.org> Date: Wed, 19 Apr 2006 23:45:40 -0400 From: Matt Hogstrom User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: Issue attempting to deploy second DB2 Datasource References: <1A54A34881D47645926D8F02C8D7B9690BF23D2F@hoex2k02.amica.com> <3974965.post@talk.nabble.com> <3989589.post@talk.nabble.com> In-Reply-To: <3989589.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Fran, I think the problem is related to the fact that the DLL can only be loaded once per process and is associated to a classloader that is not accessible to the second instance for a variety of reasons. Here is a link that provides some insight as to the restriction: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4225434 excerpt from the above link "A native library can not be loaded into two live ClassLoaders objects at the same time and the reasoning for this is obvious -- native code that caches JNI IDs will get wrong answers. The long term fix for this is a way for the native library to tell the VM (on JNI_OnLoad) that it is multiple-ClassLoader safe. That would be an RFE." Unless you must use the Type 2 Driver I recommend you move to the DB2 JCC Type 4 driver and all these problems will go away (of course I'm sure there will be several other new ones as well :) Matt Fran Varin wrote: > One thing that I did not discuss is the exeption that we are seeing. It > appears that the error is that Geronimo is trying to launch the .dll file > that backs the type 2 driver a second time. > > There must be a way to define multiple databases to a pool or to perhaps > define multiple pools. However, it is very frustrating to not get connected > with the documentation that explains it. > > Here is the stack trace that we receive: > > 11:25:45,739 ERROR [GBeanInstanceState] Error while starting; GBean is now > in the FAILED state: > objectName="geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=user/database-pool-BLUEGDB/1/car,j2eeType=JCAManagedConnectionFactory,name=BLUEGDB" > java.sql.SQLException: java.lang.UnsatisfiedLinkError: Native Library > C:\Program Files\SQLLIB\bin\db2jdbc.dll already loaded in another > classloader > at COM.ibm.db2.jdbc.app.DB2Driver.(Unknown Source) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:274) > at java.lang.Class.newInstance0(Class.java:306) > at java.lang.Class.newInstance(Class.java:259) > at org.tranql.connector.jdbc.JDBCDriverMCF.setDriver(JDBCDriverMCF.java:145) > at > org.tranql.connector.jdbc.JDBCDriverMCF$$FastClassByCGLIB$$81f38179.invoke() > 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() > 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() > 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() > 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.GeneratedMethodAccessor335.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:499) > 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.GeneratedMethodAccessor335.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:536) > -- > View this message in context: http://www.nabble.com/Issue-attempting-to-deploy-second-DB2-Datasource-t1469616.html#a3989589 > Sent from the Apache Geronimo - Users forum at Nabble.com. > > > >