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'?

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.