org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'loginservice' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cx.service.LoginServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:  The import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web19379

  • [cx.service.LoginServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problemsThe import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl
  • via oschina.net by Unknown author, 9 months ago
    [cx.service.LoginServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problemsThe import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl
  • via Coderanch by Otis Onesh, 6 months ago
    Error creating bean with name 'test' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginservice' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cx.service.LoginServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:  The import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:943) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) 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.BeanInstantiationException: Could not instantiate bean class [cx.service.LoginServiceImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:  The import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:76) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990) ... 23 more Caused by: java.lang.Error: Unresolved compilation problems:  The import org.springframework cannot be resolved HibernateDaoSupport cannot be resolved to a type The method getHibernateTemplate() is undefined for the type LoginServiceImpl at cx.service.LoginServiceImpl.<init>(LoginServiceImpl.java:4) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.