Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Failure invoking bundle.loadClass(String clazz) in version M06 and higher
Failure invoking bundle.loadClass(String clazz) in version M06 and higher [message #722390] Mon, 05 September 2011 15:50 Go to next message
Carlos Salinas is currently offline Carlos SalinasFriend
Messages: 32
Registered: March 2011
Location: Avd. de la Argentina 132,...
Member
Hello community,

I have developed a custom servlet inside a Fragment Bundle and when i execute the following command:

return (Class<? extends Application>) bundle.loadClass(className);


or the following snippet to retrieve a Spring bean (when i want to get the same object but through the ApplicationContext registered as service by Spring DM):

 final Application application = (Application) springContext.getBean(beanParam);


And exception is triggered :


.....

org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: com.vaadin.osgi.spring.MyVaadinApplication in KernelBundleClassLoader: [bundle=com.vaadin.osgi.spring_0.0.1.SNAPSHOT]
org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)

.....



I thing the source of the problem is the invoking of the loadClass method from the Bundle Interface from the OSGi framework. I only reproduce this failure in versions equal or higher than M06. In lower version all is correct and the servlet works.

Thank you.

[Updated on: Mon, 05 September 2011 15:51]

Report message to a moderator

Re: Failure invoking bundle.loadClass(String clazz) in version M06 and higher [message #722415 is a reply to message #722390] Mon, 05 September 2011 17:59 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Virgo Tomcat 3 now conforms strictly with RFC 66 and therefore some manifest headers are no longer set to default values. For more details see the Migration Notes / Web.

Can you please check if setting the WABHeaders to defaulted will help?
Re: Failure invoking bundle.loadClass(String clazz) in version M06 and higher [message #722607 is a reply to message #722415] Tue, 06 September 2011 10:30 Go to previous message
Carlos Salinas is currently offline Carlos SalinasFriend
Messages: 32
Registered: March 2011
Location: Avd. de la Argentina 132,...
Member
Hi Hristo,
you were right, finally i needed to add explicitly the Bundle-Classpath: WEB-INF/classes to the webapp´s MANIFEST. But also i have tested the edition of the org.eclipse.virgo.web.properties setting the defaulted value in the WABHeaders KEY, as u asked me, without the Bundle-ClassPath header and even it works.

So now it runs in any Virgo version.

Now i am able to show my Vaadin+Virgo example in the following OSGi ALLIANCE COMMUNITY EVENT

Thank you very much.
Previous Topic:Can't create plan project as described in Programmer Guide
Next Topic:Preventing double bundle start when developing plan in Eclipse tooling
Goto Forum:
  


Current Time: Fri Apr 19 06:07:05 GMT 2024

Powered by FUDForum. Page generated in 0.01792 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top