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
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
.
.
.
Caused by: java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:97)
.
.
.
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.persistence.EntityListeners in KernelBundleClassLoader: [bundle=com.springsource.org.hibernate.core_4.1.0.Final]
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
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(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
... 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: http://wiki.eclipse.org/Virgo/Samples.

[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: Mon Dec 22 17:02:41 GMT 2014

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

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