struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Instance must not be null (Spring+Struts+Hibernate)
Date Mon, 25 Jun 2007 20:58:33 GMT
This is a Spring issue, not Struts. It looks like you have something 
missing or mis-configured in your String applicationContext.xml 
configuration file. Review that and, if you can't find the problem, ask 
on the Spring forums -- and make sure to include the relevant parts of 
your config file so they can tell you what's wrong with it.

L.

GEDA wrote:
> Hi guys. I cannot understand this problem and its driving me crazy. Can you
> please take a look at the errors stack ? Thank you very much :
> 
> SEVERE: Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name
> 'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor':
> Cannot create inner bean '(inner bean)' of type
> [org.springframework.transaction.interceptor.TransactionInterceptor] while
> setting bean property 'transactionInterceptor'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name '(inner bean)': Cannot resolve reference to bean
> 'transactionManager' while setting bean property 'transactionManager';
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'transactionManager' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'entityManagerFactory' while setting bean property 'entityManagerFactory';
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'entityManagerFactory' defined in
> ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.lang.IllegalArgumentException:
> Instance must not be null
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name '(inner bean)': Cannot resolve reference to bean
> 'transactionManager' while setting bean property 'transactionManager';
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'transactionManager' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'entityManagerFactory' while setting bean property 'entityManagerFactory';
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'entityManagerFactory' defined in
> ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.lang.IllegalArgumentException:
> Instance must not be null
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'transactionManager' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'entityManagerFactory' while setting bean property 'entityManagerFactory';
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'entityManagerFactory' defined in
> ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
> init method failed; nested exception is java.lang.IllegalArgumentException:
> Instance must not be null
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'entityManagerFactory' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Invocation of init method
> failed; nested exception is java.lang.IllegalArgumentException: Instance
> must not be null
> Caused by: java.lang.IllegalArgumentException: Instance must not be null
>         at org.springframework.util.Assert.notNull(Assert.java:112)
>         at
> org.springframework.util.ClassUtils.getAllInterfaces(ClassUtils.java:696)
>         at
> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createEntityManagerFactoryProxy(AbstractEntityManagerFactoryBean.java:272)
>         at
> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:260)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:215)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:127)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:87)
>         at
> org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:96)
>         at
> org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:83)
>         at
> org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:66)
>         at
> org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:296)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:312)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1180)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:733)
>         at
> org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:511)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:337)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
>         at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1204)
>         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.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>         at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
>         at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:814)
>         at
> org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:619)
> 
> Any help would be greatly appreciated :)
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message