Hi,
I'm trying to change sample web admin to use application context utilized by standalone jobs and got following exception during startup:
Code:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [${batch.lob.handler.class}] for bean with name 'lobHandler' defined in class path resource [..../batch/common/config/data-source-context.xml]; nested exception is java.lang.ClassNotFoundException: ${batch.lob.handler.class} at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:315) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:394) [spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:594) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
and then there are more exceptions of same type for other beans.
It looks like it tries to use bean's class property in the call to
(AbstractApplicationContext, line 594)Code:Map<String, BeanDefinitionRegistryPostProcessor> beanMap = beanFactory.getBeansOfType(BeanDefinitionRegistryPostProcessor.class, true, false);
before PropertyResourceConfigurer invoked from
(AbstractApplicationContext, line 601)Code:invokeBeanFactoryPostProcessors(registryPostProcessors, beanFactory);
The standalone application uses same context without any problem. Does the way a web context is loaded differ from the normal one? What could I have done wrong?
Best regards, Eugene.


Reply With Quote