On Fri, Jun 22, 2012 at 7:46 PM, ramesh chandra <[email protected]> wrote:
> On 06/22/2012 09:08 PM, Chris Geer wrote: > > On Fri, Jun 22, 2012 at 5:12 PM, ramesh chandra <[email protected]>wrote: > > I have wrapped an external library ( Cassandra - Hector Client ) as a > bundle , but I am constantly getting a ClassNotFoundException. So , I tried > passing the missing (Thrift Library) after wrapping as a bundle, but it > does not help either. > > How did you go about making it a bundle? > > > Is there any other way I can explicitly make one bundle aware of other ? > > > You need to make sure two things happen. Your Cassandra bundle exports > the correct packages and your other bundle imports the correct packages. > > > Just in case if anyone has see it , this is the error > > Caused by: java.lang. ClassNotFoundException: org.apache.thrift.transport. > TTransportException not found by me.prettyprint.hector [169] > > at org.apache.felix.framework. ModuleImpl. > findClassOrResourceByDelegatio n(ModuleImpl.java:787) > at org.apache.felix.framework. ModuleImpl.access$400( > ModuleImpl.java:71) > at org.apache.felix.framework. ModuleImpl$ModuleClassLoader. > loadClass(ModuleImpl.java: 1768) > at java.lang.ClassLoader. loadClass(ClassLoader.java: 247)[:1.6.0_26] > > ... 41 more > > appreciate any help > > kind regards, > Ramesh > > > Hi Chris, > > Thanks for the input. Karaf has a beautiful wrapper for external library > osgi:install wrap:mvn:Group/Artifact/version does a quick and easy > install. > Have you checked the imports/exports of your bundles? From the Karaf console "headers <bundle-id>". > > regards, > Ramesh >
