Announcement Announcement Module
Collapse
No announcement yet.
Context initialization failed plz help.. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Context initialization failed plz help..

    hi am new to spring am instantiatin bean throug xml I incuded setters and getters in parent class of the bean.traying to instatiate sub class. getting following exception...


    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'empJdbcTemplate' defined in class path resource [com/carrefour/fr/portail/carburant/emp/ejb-portail-carburant-emp-application-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/core/namedparam/SqlParameterSource
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateBean(Abstrac tAutowireCapableBeanFactory.java:883)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:839)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3910)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4393)
    at org.jboss.web.tomcat.service.deployers.TomcatDeplo yment.performDeployInternal(TomcatDeployment.java: 310)
    at org.jboss.web.tomcat.service.deployers.TomcatDeplo yment.performDeploy(TomcatDeployment.java:142)
    at org.jboss.web.deployers.AbstractWarDeployment.star t(AbstractWarDeployment.java:461)
    at org.jboss.web.deployers.WebModule.startModule(WebM odule.java:118)
    at org.jboss.web.deployers.WebModule.start(WebModule. java:97)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:668)
    at org.jboss.system.microcontainer.ServiceProxy.invok e(ServiceProxy.java:206)
    at $Proxy38.start(Unknown Source)
    at org.jboss.system.microcontainer.StartStopLifecycle Action.installAction(StartStopLifecycleAction.java :42)
    at org.jboss.system.microcontainer.StartStopLifecycle Action.installAction(StartStopLifecycleAction.java :37)
    at org.jboss.dependency.plugins.action.SimpleControll erContextAction.simpleInstallAction(SimpleControll erContextAction.java:62)
    at org.jboss.dependency.plugins.action.AccessControll erContextAction.install(AccessControllerContextAct ion.java:71)
    at

  • #2
    Use code tags when posting code/stacktraces!

    You're either missing spring-jdbc jar, or you have a classloader issue (have more than one such jar or more than one version of the jar on classpath, or you are using different versions between spring-core and spring-jdbc, or have somehow broken dependency management).

    I strongly suggest using Maven to manage your project dependencies.

    Comment

    Working...
    X