Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring ORM Bundle - ClassNotFoundException(javax.persistence.metamodel.Metamodel import missing on Virgo Provided bundle?)
Spring ORM Bundle - ClassNotFoundException [message #835286] Tue, 03 April 2012 02:21 Go to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi all! Im have a library that uses the javax.persistence.metamodel.Metamodel class sometimes.

This library is a normal bundle, importing the javax.persistence.metamodel package, and this import is resolved normally. But when I try to library, this exception occours:

Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.persistence.metamodel.Metamodel in KernelBundleClassLoader: [bundle=org.spring
framework.orm_3.0.5.RELEASE]
        at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 56 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.persistence.metamodel.Metamodel
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:134)
        ... 57 common frames omitted


I see that the Manifest on org.springframework.orm-3.0.5.RELEASE bundle is missing this package import (but all other javax.persistence imports of the 2.0 spec is present). So, after add the package import with optional resolution, as the others, the application works well.

This can be a bug on the manifest header of this Virgo provided bundle?

Im using Virgo 3.0.2Release.
Re: Spring ORM Bundle - ClassNotFoundException [message #835424 is a reply to message #835286] Tue, 03 April 2012 07:33 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The org.springframework.orm-3.0.5.RELEASE bundle is provided by the Spring framework project. Perhaps you would like to contact that project to see whether this is a bug. Meanwhile, please note that you can add an import without editing the bundle by attaching a fragment, which is probably a more maintainable workaround. See this FAQ.
Re: Spring ORM Bundle - ClassNotFoundException [message #835561 is a reply to message #835424] Tue, 03 April 2012 11:51 Go to previous message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi Glyn! Thanks by help. I will create a fragment bundle to import this package. I need to configure this bundle inside any existing plan, or it will be activated together with Spring ORM Bundle if I put it on the Virgo repository?

I will post this question on Spring too.
Previous Topic:Replacing OSGI bundles in the running environment
Next Topic:Why is there a uses conflict without disjoint ranges?
Goto Forum:
  


Current Time: Fri Mar 29 00:57:30 GMT 2024

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

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

Back to the top