Moving from 3.5.0 to 3.6.2.RELEASE results in "not visible from classloader" [message #1288459] |
Tue, 08 April 2014 11:29  |
Eclipse User |
|
|
|
We are currently updating from 3.5.0.M03 to 3.6.2.RELEASE version of virgo. AspectJ weaver and spring framework have been updated to 1.7.1 and 3.2.2 respectively using the instructions in the FAQ (http://wiki.eclipse.org/Virgo/FAQ#How_can_I_change_the_version_of_Spring_framework_in_the_user_region.3F). We have isolated the issue to a bundle that relies on spring-batch-core and is failing to load "org.springframework.batch.core.repository.JobRepository". The failure as follows:
[2014-04-07 12:06:45.624] region-dm-0 <AG0000E> Application context creation failure for bundle 'com.foo.service.jobmanager.sb' version '1.0.1.201404011219'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'basicStep': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: interface org.springframework.batch.core.repository.JobRepository is not visible from class loader
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:532)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
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:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: interface org.springframework.batch.core.repository.JobRepository is not visible from class loader
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1448)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.batch.core.configuration.xml.CoreNamespacePostProcessor.injectDefaults(CoreNamespacePostProcessor.java:132)
at org.springframework.batch.core.configuration.xml.CoreNamespacePostProcessor.postProcessBeforeInitialization(CoreNamespacePostProcessor.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1481)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
... 16 common frames omitted
Caused by: java.lang.IllegalArgumentException: interface org.springframework.batch.core.repository.JobRepository is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:461)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:690)
at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:119)
at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:110)
at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:98)
at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean.getObject(AbstractJobRepositoryFactoryBean.java:198)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 26 common frames omitted
I found a previous thread (http://www.eclipse.org/forums/index.php/t/433311/) that indicates that we should look into the class loader for more clues. I have enabled debugging. I see that the JobRespository class was previously loaded from the appropriate bundle:
Started bundle 'org.springframework.batch.core' version '2.1.9.RELEASE'. Bundle: Active sl = 6; Bundle 180 sl = 4
....
BundleClassLoader[org.springframework.batch.core_2.1.9.RELEASE].loadClass(org.springframework.batch.core.repository.JobRepository)
BundleLoader[org.springframework.batch.core_2.1.9.RELEASE].loadBundleClass(org.springframework.batch.core.repository.JobRepository)
BundleLoader[org.springframework.batch.core_2.1.9.RELEASE].findLocalClass(org.springframework.batch.core.repository.JobRepository)
BundleClassLoader[null].findClassImpl(org.springframework.batch.core.repository.JobRepository)
about to read 1109 bytes from org/springframework/batch/core/repository/JobRepository.class
read 1109 bytes from null/org/springframework/batch/core/repository/JobRepository.class
defining class org.springframework.batch.core.repository.JobRepository
BundleLoader[org.springframework.batch.core_2.1.9.RELEASE] found local class org.springframework.batch.core.repository.JobRepository
Just before the failure, I see the following:
BundleClassLoader[com.foo.persistence.db_1.0.1.201404041301].loadClass(org.springframework.batch.core.repository.JobRepository)
BundleLoader[com.foo.persistence.db_1.0.1.201404041301].loadBundleClass(org.springframework.batch.core.repository.JobRepository)
BundleLoader[com.foo.persistence.db_1.0.1.201404041301].findLocalClass(org.springframework.batch.core.repository.JobRepository)
BundleClassLoader[null].findClassImpl(org.springframework.batch.core.repository.JobRepository)
BundleClassLoader[com.foo.persistence.db_1.0.1.201404041301].loadClass(org.springframework.batch.core.repository.JobRepository) fai
led.
I see the above messages occure several times in the debug output prior to the failure. What is also confusing is that the bundle com.foo.persistence.db has no references to spring-batch-core.
This is a large application and providing a sample is proving to be difficult. Does anyone have any ideas on what I can do to troubleshoot this further?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11246 seconds