exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined

Ads
 

exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined

Hi,

In my web application following error is coming:

exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
    org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530)
    org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
    org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
    javax.servlet.GenericServlet.init(GenericServlet.java:158)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Thread.java:745)

How to solve this error?

Thanks

View Answers

May 5, 2016 at 1:30 AM

Hi,

Add following code in spring-context.xml file:

<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>

This error is coming because your application is not able to find Transaction manager class.

Thanks

Ads









Related Tutorials/Questions & Answers:
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined...: No bean named 'transactionManager' is defined  Hi, In my web... following code in spring-context.xml file: <bean id="transactionManager" class
I am getting error org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'IS_AUTHENTICATED_ANONYMOUSLY' is defined - Spring
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'IS_AUTHENTICATED_ANONYMOUSLY' is defined  Hello, I... org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'IS_AUTHENTICATED_ANONYMOUSLY' is defined  Hi,Got.../**=ROLE_DEVELOPERto the Bean:<bean id="filterChainProxy" class="
Advertisements
User Defined Exception In Java
User Defined Exception In Java In terms of programming when we talk about.... Then you will be required to create your own exception. A user defined exception can... for defining a user defined exception your exception class should be the subclass
bean creation exception
bean creation exception  hi i am getting exception while running simple spring ioc program Exception in thread "main... path resource [beans.xml]; nested exception is java.io.FileNotFoundException
Java User-defined Exception
Java User-defined Exception In this tutorial, you will learn about the User-defined Exceptions. These custom exceptions actually all the programmer... a user defined exception if the student marks entered, is less than fifteen
User Defined Exception
User Defined Exception     ....     How to Handle and create User-defined Exception The keywords used...-defined exceptions. This Exception class inherits all the method from Throwable
User Defined Exception
User Defined Exception     ....     How to Handle and create User-defined Exception The keywords used...-defined exceptions. This Exception class inherits all the method from Throwable
Bean
Bean  what is bean? how to use bean   HTML Code: Contents MOBILE STORE HOME PRODUCTS IMAGES COMPANY... { out.println("not correct"); } } catch(Exception e
exception
user defined unchecked exception  can we create user defined...;Please visit the following links: http://www.roseindia.net/java/java-exception/user-defined-exception.shtml http://www.roseindia.net/java/exceptions/making
exception
defined checked exception ââ?¬Å?InvalidCharcterFoundExceptionââ?¬Â? and creater a block of codes that will handle the exception
exception
arguments are not equalto two,throw a user defined exception "invalid parameter exception" ,otherwise display the two parameters.   Here is an example... is not equal to two then invalid parameter exception is thrown ,otherwise display the two
exception
exception  wHEN RUNTIME EXCEPTION CLASS IS SUB OF EXCEPTION CLASS HOW CAN'T HANDLE UNCHECKED EXCEPTION
exception
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception
exception
exception  what is the use of catch block even though we have predefined exception object
exception
exception  example for numberformat exception   Hi Friend, Try the following code: class NumberFormatExceptionEx{ public static void...); } catch(Exception e){ System.out.println(e
Exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main
Exception
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int.... ex.printStackTrace(); System.exit(1); } catch(Exception ex
Exception
Exception   I was creating a table dynamically but it shows exception i.e shown down Suplier created0 Suplier created0 Suplier created0 Product created0 Product created0 Product created0 Product created0 could not fetch initial
Stateful Session Bean Example
Stateful Session Bean Example   ... will learn how to develop, deploy, and run a simple Java EE application named account using stateful session bean. The purpose of account is to performs two
Exception
Exception  what is NullPointerException?   Hi, I java NullPointerException java.lang.NullPointerException) is defined in the java.lang package. The NullPointerException is thrown by the Java program at the time
exception
exception  Identify the reason for SQLException exception, which is encountered when the developer tries to run the following code snippet to insert..."); ps.executeUpdate(); } catch(Exception e
custom exception
custom exception  What is user defined exception
ptor is not defined
ptor is not defined  Hi, I am trying to use the protractor for HTML test cases. Due to some reason it is giving error ptor is not defined. How to resolve ptor is not defined error? Thanks   Hi, If you are still
Stateless Session Bean Example
Stateless Session Bean Example   ... to develop, deploy, and run a simple Java EE application named example using stateless session bean. The purpose of example is to performs the mathematical
Hibernate named queries
Hibernate named queries  Hi, What is named queries in Hibernate? Thanks
USER DEFINED CLASS
USER DEFINED CLASS  hi please help me with my project: Exercise # 1 Create a java program for a class named MyDate that contains data members... named month, day, and year should be private members so that they cannot
getting classnotfound exception while running login application
getting classnotfound exception while running login application  hi, I am getting Error creating bean with name 'urlMapping' defined... [com.mazeed.LoginFormController] for bean with name 'loginController' defined
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
Java Exception Class Hierarchy Diagram
class. The class Exception and its subclasses are defined in such a way that an application may generate a condition which might be caught. The Exception class... constructor which creates a new Exception object. It contains a pre defined message
user defined date class
user defined date class  Develop a user defined date class with public.Fill the members using existing class method.implement the methods for finding current date(),days between method,advanced days and after days
user defined date class
user defined date class  Develop a user defined date class with public.Fill the members using existing class method.implement the methods for finding current date(),days between method,advanced days and after days

Ads