Thank you. I will take a look at the URL -----Original Message----- From: Agustín Gañán [mailto:[email protected]] Sent: Thursday, May 27, 2010 5:07 PM To: [email protected] Subject: Re: smx 4.2, activemq with oracle persistency
Great!!! You can find more info about the "wrap" protocol here [1]. The difference is that when you install a jar (no bundle) directly in the OSGI container, this jar not "share" any of its packages with the others deployed, but by using the wrap protocol you can wrap an existing jar as an OSGi bundle (wich exports its packages availables to the other bundles). Cheers, Agus [1] http://wiki.ops4j.org/display/paxurl/Wrap+Protocol 2010/5/27 Gitanjali Nanda <[email protected]>: > Thank you very much. You saved me. It worked. I am getting other issues > related to insufficient privilege that I will look into. > Could you please let me know what is the difference between osgi:install -s > wrap:file:/// command and > Osgi:install -s file: command. > > Thanks & Regards > Gita > > > -----Original Message----- > From: Agustín Gañán [mailto:[email protected]] > Sent: Thursday, May 27, 2010 12:29 PM > To: [email protected] > Subject: Re: smx 4.2, activemq with oracle persistency > > Try this: > > osgi install -s > wrap:file:///C:/phaseforward/workspace/servicemix/apache-servicemix-4.2.0/lib/ojdbc14.jar > > And read this post[1] > > Regards, > > Agus > > [1] http://fusesource.com/forums/thread.jspa?messageID=2942 > > 2010/5/27 Gitanjali Nanda <[email protected]>: >> Could someone please suggest how to make oracle driver available to dbcp >> for the activemq-broker.xml to use. >> I tried dropping ojdbc14.jar under lib folder -- did not work >> I tried installing it as below >> osgi:install -s >> file:C:/phaseforward/workspace/servicemix/apache-servicemix-4.2.0/lib/ojdbc14.jar >> -- did not work >> >> I am getting below error >> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC >> driver class 'oracle.jdbc.driver.OracleDriver' >> at >> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1142) >> at >> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:881) >> at >> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54) >> ... 25 more >> Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver >> not found from bundle [activemq-broker.xml] >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >> at >> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1135) >> ... 27 more >> Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver >> at >> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814) >> at >> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61) >> at >> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >> at >> org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:674) >> at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1543) >> at >> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887) >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) >> >> >> -----Original Message----- >> From: gnanda [mailto:[email protected]] >> Sent: Wednesday, May 26, 2010 6:02 PM >> To: [email protected] >> Subject: RE: smx 4.2, activemq with oracle persistency >> >> >> The blog you sent talks about doing dynamic imports. >> >> I tried both the below version of dbcp >> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_2 >> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_5 >> >> >> The first one has the dynamic imports active by default, the second one >> tries to use a more intelligent way of getting to the right package for the >> JDBC driver class. >> I am still getting below error >> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC >> driver class 'oracle.jdbc.driver.OracleDriver' >> at >> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1142) >> at >> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:881) >> at >> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54) >> ... 25 more >> Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver >> not found from bundle [activemq-broker.xml] >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >> at >> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1135) >> ... 27 more >> Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver >> at >> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814) >> at >> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61) >> at >> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >> at >> org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:674) >> at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1543) >> at >> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887) >> at >> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) >> >> >> >> iocanel wrote: >>> >>> I am not sure if this is directly related to your case, but have a look at >>> this blog post: >>> >>> http://trenaman.blogspot.com/2008/12/sharing-oracle-jdbc-pool-in-smx4.html >>> http://trenaman.blogspot.com/2008/12/sharing-oracle-jdbc-pool-in-smx4.html >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/smx-4.2%2C-activemq-with-oracle-persistency-tp28672822p28687077.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> >
