Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Scoped plan with EclipseLink runs into problems(Switching from unscoped to scoped results in errors)
Scoped plan with EclipseLink runs into problems [message #875857] Wed, 23 May 2012 09:08 Go to next message
Rich Mayfield is currently offline Rich Mayfield
Messages: 44
Registered: August 2010
Member
Eclipse Virgo 3.5.0M4 Jetty edition

So I have a plan that when unscoped (scoped="false") everything works fine. When scoped though I run into the exception below. The error is:

Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]

In my case Spring is wiring together my JPA context. I assume that it must be doing some magic with the thread context classloader. I read

http://underlap.blogspot.com/2011/02/thread-context-class-loading-in-virgo.html

which was great and got me past the initial class-not-found issues as my bundle needed to export a package to be included in the synthetic context. This one has me stumped though. As far as I can tell:

* I've exported everything from my bundles needed by the code using the thread context.
* org.eclipse.persistence bundle's export the package org.eclipse.persistence.indirection (and more)

Is there any way to flush out what the problem might be here?

======= full stack trace======
[2012-05-23 05:48:10.871] start-signalling-3 <DE0006E> Start failed for plan 'acmeserver' version '8.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlHelper' defined in URL [bundleentry://199.fwk1624485351/spring-context/application/sql_context.xml]: Cannot resolve reference to bean 'configurator' while setting bean property 'configurator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurator' defined in URL [bundleentry://199.fwk1624485351/spring-context/application/domain/configuration_context.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [PersistenceUnit-delimited] failed.
Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurator' defined in URL [bundleentry://199.fwk1624485351/spring-context/application/domain/configuration_context.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [PersistenceUnit-delimited] failed.
Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 20 common frames omitted
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [PersistenceUnit-delimited] failed.
Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:273)
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
at com.acme.configuration.impl.ConfiguratorImpl.init_aroundBody0(ConfiguratorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 27 common frames omitted
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [PersistenceUnit-delimited] failed.
Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:460)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:400)
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:321)
... 44 common frames omitted
Caused by: org.eclipse.persistence.exceptions.EntityManagerSetupException:
Exception Description: Deployment of PersistenceUnit [PersistenceUnit-delimited] failed.
Internal Exception: Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.eclipse.persistence.exceptions.EntityManagerSetupException.deployFailed(EntityManagerSetupException.java:229)
... 51 common frames omitted
Caused by: org.eclipse.persistence.exceptions.ValidationException:
Exception Description: Class: [org.eclipse.persistence.indirection.IndirectList] was not found while converting from class names to classes.
Internal Exception: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.eclipse.persistence.exceptions.ValidationException.classNotFoundWhileConvertingClassNames(ValidationException.java:2341)
at org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:127)
at org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses(CollectionMapping.java:855)
at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1534)
at org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:432)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:428)
... 50 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.persistence.indirection.IndirectList in KernelBundleClassLoader: [bundle=server-1-synthetic.context_1.0.0]
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:119)
at org.eclipse.persistence.internal.queries.InterfaceContainerPolicy.convertClassNamesToClasses(InterfaceContainerPolicy.java:124)
... 54 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.indirection.IndirectList
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)
... 59 common frames omitted

Re: Scoped plan with EclipseLink runs into problems [message #876003 is a reply to message #875857] Wed, 23 May 2012 14:10 Go to previous message
Rich Mayfield is currently offline Rich Mayfield
Messages: 44
Registered: August 2010
Member
So I'm wondering, given a scenario like the one depicted in

http://underlap.blogspot.com/2011/02/thread-context-class-loading-in-virgo.html

Where bundles 'A' and 'B' are in a scoped application that calls a library bundle 'L' outside of the application, 'L' can "see" packages exported by 'A' and 'B'.

What if 'A' or 'B' imported something from bundle 'E' that also lived outside of the scoped application. Should/would 'L' be able to "see" packages in 'E'?

The scenario I raise above seems to indicate that packages in 'E' are not visible, however I think that this is why the scoped application is failing. Do my 'A' and 'B' bundles need to re-export the 'E' packages in order for 'L' to see them?
Previous Topic:Use of plain old Eclipse Plugins with Virgo Tooling
Next Topic:Virgo hangs while starting after upgrade from M2 to M4
Goto Forum:
  


Current Time: Sat Apr 19 05:58:09 EDT 2014

Powered by FUDForum. Page generated in 0.02039 seconds