javax.persistence.TransactionRequiredException: no transaction is in progress

Stack Overflow | Alex Chihaia | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Jeeves / Db query in config failed

    GitHub | 3 years ago | fxprunayre
    javax.persistence.TransactionRequiredException: no transaction is in progress
  2. 0

    entitymanager persist does not save to database

    Stack Overflow | 3 years ago | Dhorium
    javax.persistence.TransactionRequiredException: no transaction is in progress
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    JpaRepository: No Transaction in progress

    Stack Overflow | 3 years ago | karthik
    javax.persistence.TransactionRequiredException: no transaction is in progress

  1. tvrmsmith 1 times, last 2 months ago
6 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. javax.persistence.TransactionRequiredException

    no transaction is in progress

    at org.hibernate.jpa.spi.AbstractEntityManagerImpl.checkTransactionNeeded()
  2. org.hibernate.jpa
    AbstractEntityManagerImpl.flush
    1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.checkTransactionNeeded(AbstractEntityManagerImpl.java:1136)
    2. org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1297)
    2 frames
  3. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    4. java.lang.reflect.Method.invoke(Method.java:507)
    4 frames
  4. Spring ORM
    ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke
    1. org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:347)
    1 frame
  5. com.sun.proxy
    $Proxy24.flush
    1. com.sun.proxy.$Proxy24.flush(Unknown Source)
    1 frame
  6. com.licenta.ascourses
    TestController.saveUser
    1. com.licenta.ascourses.repositories.jpa.JpaUserRepo.createUser(JpaUserRepo.java:32)
    2. com.licenta.ascourses.service.UserServiceImpl.createUser(UserServiceImpl.java:33)
    3. com.licenta.ascourses.controller.TestController.saveUser(TestController.java:30)
    3 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    4. java.lang.reflect.Method.invoke(Method.java:507)
    4 frames
  8. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    2 frames
  9. Spring MVC
    FrameworkServlet.doPost
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    8 frames
  10. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    1 frame
  11. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    1 frame
  12. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    1 frame
  13. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    2 frames
  14. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    1 frame
  15. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    10 frames
  16. Grizzly HTTP
    SocketProcessorBase.run
    1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
    2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
    5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    5 frames
  17. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    2 frames
  18. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    1 frame
  19. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:785)
    1 frame