Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Strange ClassNotFoundException(problem with ClassNotFound)
icon5.gif  Strange ClassNotFoundException [message #966183] Wed, 31 October 2012 20:38 Go to next message
Amir Mohammad Vosough is currently offline Amir Mohammad VosoughFriend
Messages: 1
Registered: December 2010
Junior Member
Hi there. i'm trying to configure a virgo project using hibernate and spring-orm. i faced so many exceptions i can't remember!
but the odd thing for me is that i faced two ClassNotExceptions where i shouldn't be!
i have added 'com.springsource.javax.persistence;version="[1.0.0,1.0.0]"' to the MANIFEST.MF, but when i try to run virgo, i get this exception:
<DE0006E> Start failed for bundle 'ir.amv.db.core' version '1.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [bundleentry://151.fwk228728499/META-INF/spring/DBAppContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
Caused by: java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.persistence.EntityListeners in KernelBundleClassLoader: []
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(Unknown Source)
... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.persistence.EntityListeners
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(
... 27 common frames omitted
how is this possible? if the jar file isn't really present, shouldn't i be getting 'unable to satisfy dependency blah blah blah'?
Re: Strange ClassNotFoundException [message #968337 is a reply to message #966183] Fri, 02 November 2012 11:34 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The problem is that Hibernate core is trying to load the class, but you presumably imported the package into your application bundle. Try to find a hibernate example that works as a starting point - look here:

[Updated on: Fri, 02 November 2012 11:35]

Report message to a moderator

Previous Topic:Datasource not found in par deployment
Next Topic:Virgo 3.6.0.M03
Goto Forum:

Current Time: Tue Jun 19 20:33:05 GMT 2018

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

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

Back to the top