org.springframework.orm.hibernate5.HibernateSystemException: getNamedQuery is not valid without active transaction; nested exception is org.hibernate.HibernateException: getNamedQuery is not valid without active transaction

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by vwilliam
, 1 year ago
getNamedQuery is not valid without active transaction; nested exception is org.hibernate.HibernateException: getNamedQuery is not valid without active transaction
via GitHub by vwilliam
, 1 year ago
=2016-08-26]; nested exception is org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [protected java.lang.String org.friends.app.model.Place$PlacePK.occupationDate] by reflection for persistent property [org.friends.app.model.Place$PlacePK#occupationDate] : Place [placeNumber=141, usedBy=null, occupationDate=2016-08-26]
via Stack Overflow by Nicholas
, 1 year ago
Unknown entity: milkiv.easyword.models.UserRole; nested exception is org.hibernate.MappingException: Unknown entity: milkiv.easyword.models.UserRole
via Stack Overflow by Mahesh Vemula
, 1 month ago
HHH000142: Javassist Enhancement failed: com.hmc.nurseline.model.customer.NurselineCustomerModel; nested exception is org.hibernate.HibernateException: HHH000142: Javassist Enhancement failed: com.hmc.nurseline.model.customer.NurselineCustomerModel
via Stack Overflow by yankee
, 1 year ago
IllegalArgumentException occurred calling getter of ecommutils.Handleprops.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of ecommutils.Handleprops.id
via Stack Overflow by larand
, 8 months ago
IllegalArgumentException occurred while calling setter for property [com.buffer.ProdBuffer.id (expected type = java.lang.Long)]; target = [com.buffer.ProdBuffer : (unsaved)], property value = [1] setter of com.buffer.ProdBuffer.id; nested exception
org.springframework.orm.hibernate5.HibernateSystemException: getNamedQuery is not valid without active transaction; nested exception is org.hibernate.HibernateException: getNamedQuery is not valid without active transaction
at com.sun.proxy.$Proxy103.getNamedQuery(Unknown Source)
at org.friends.app.dao.impl.UserSessionDaoImpl.findByCookie(UserSessionDaoImpl.java:43)
at org.friends.app.dao.impl.UserSessionDaoImpl$$FastClassBySpringCGLIB$$868a5ea9.invoke()
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.friends.app.dao.impl.UserSessionDaoImpl$$EnhancerBySpringCGLIB$$db73cfde.findByCookie()
at org.friends.app.service.impl.UserServiceBean.findUserByCookie(UserServiceBean.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.sun.proxy.$Proxy102.findUserByCookie(Unknown Source)
at org.friends.app.view.route.AuthenticatedRoute.checkAuthenticated(AuthenticatedRoute.java:44)
at org.friends.app.view.route.AuthenticatedRoute.handle(AuthenticatedRoute.java:25)
at spark.TemplateViewRouteImpl$1.handle(TemplateViewRouteImpl.java:66)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
at spark.servlet.SparkFilter.doFilter(SparkFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

3 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.