Retrieving a Bundle Classpath [message #753470] |
Thu, 27 October 2011 08:14  |
Eclipse User |
|
|
|
Hi,
Is there a way to retrieve the running bundles classpath? Or any straightforward way to find this out? I know that the ClassLoader is a KernelBundleClassLoader, but this does not seem to provide methods for accessing the classpath string/array.
The reason I ask is for diagnostic purposes. Virgo is telling me something could not be found on the classpath although it is being imported.
Thanks
|
|
|
|
|
Re: Retrieving a Bundle Classpath [message #753489 is a reply to message #753486] |
Thu, 27 October 2011 09:15   |
Eclipse User |
|
|
|
Hi Glyn,
Thanks for your advice!
I have used these commands, they really are helpful. Hence why I'm stuck.
Basically I'm having an issue where my bundle cannot find CGLIB at runtime (although it is imported successfully) which is also shown using clload, clhas, clexport as expected. Although I'm still getting the following error:
AG0000E Application context creation failure for bundle 'com.acme.osgi.hibernate-session' version '1.0.0.SNAPSHOT'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dynamicConfiguration' defined in BeanDefinition defined in URL [bundleentry://153.fwk32113234/META-INF/spring/bundle-context.xml]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.
With the interesting part being:
org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.
My proxy is simply:
<bean id="dynamicConfiguration"
class="com.notehive.osgi.hibernate_samples.session.DynamicConfiguration"
depends-on="databaseLauncher">
<!--
Need to create a proxy because of, I guess, some mysterious circular
dependency which requires this bean to exist before it can be initialized.
-->
[b]<aop:scoped-proxy/>[/b]
<property name="hibernateProperties" ref="hibernateProperties" />
</bean>
NOTE: I've been using code originally developed by Hans Loe, though added Hibernate 3.6.7 and other dependencies. OsgiHibernateSpringSpringDMSample This works fine in Equinox alone.
The following packages relevant to CGLIB 2.2.0 are being exported from one bundle, and imported into my current bundle (this resolves without problem):
org.objectweb.asm;version="3.1.0"
org.objectweb.asm.signature;version="3.1.0"
net.sf.cglib.core;version="2.2.0"
net.sf.cglib.reflect;version="2.2.0"
net.sf.cglib.proxy;version="2.2.0"
I hope you can shed a light on why my bundle cannot find CGLIB.
Thanks
[Updated on: Thu, 27 October 2011 09:19] by Moderator
|
|
|
|
Re: Retrieving a Bundle Classpath [message #754010 is a reply to message #753470] |
Mon, 31 October 2011 08:57  |
Eclipse User |
|
|
|
Hi,
I'm still getting this CGLIB problem when trying to use Hibernate inside of Virgo.
I've tried everything that is suggested in the Virgo documentation - I'm importing the Hibernate bundles from the library provided by Spring Source Enterprise Bundles - Hibernate JPA (3.4.0.GA-A).
Any ideas why I am still getting this problem?
|
|
|
Powered by
FUDForum. Page generated in 0.10920 seconds