Hibernate Error: ThreadDeath

Hi Gang,
I did post this into SLACK,too…

Does anyone have any ideas on this exception?
I have never seen it before; “ThreadDeath” :astonished:

The peculiar thing is - it is caused by a template that is a scheduled task that runs every 2.5 minutes and yet it only seems to happen once in 24 hours.

running the template, once-off - produces no error.

Java Version: OpenJDK 11
Tomcat Version: 8.5.39.0
Lucee Version: 5.3.8.206
Hibernate Extension: 3.5.5.75

Thanks;

"ERROR","http-nio-8080-exec-4","05/26/2022","13:33:24","","class org.hibernate.exception.GenericJDBCException cannot be cast to class java.lang.ThreadDeath (org.hibernate.exception.GenericJDBCException is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @2a332ff8; java.lang.ThreadDeath is in module java.base of loader 'bootstrap');class org.hibernate.exception.GenericJDBCException cannot be cast to class java.lang.ThreadDeath (org.hibernate.exception.GenericJDBCException is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @2a332ff8; java.lang.ThreadDeath is in module java.base of loader 'bootstrap');lucee.runtime.exp.NativeException: class org.hibernate.exception.GenericJDBCException cannot be cast to class java.lang.ThreadDeath (org.hibernate.exception.GenericJDBCException is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @2a332ff8; java.lang.ThreadDeath is in module java.base of loader 'bootstrap')
        at lucee.commons.lang.ExceptionUtil.rethrowIfNecessary(ExceptionUtil.java:200)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:348)
        at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
        at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:785)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
        at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
        at model.verbatimmodel_cfc$cf.udfCall2(/gsncfc/model/verbatimModel.cfc:226)
        at model.verbatimmodel_cfc$cf.udfCall(/gsncfc/model/verbatimModel.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
        at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
        at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
        at dbsetup.scripts.verbatimdataloadrt_cfm$cf$mv.call(/dbsetup/scripts/verbatimDataLoadRT.cfm:11)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
        at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:217)
        at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
        at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2460)
        at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2450)
        at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2421)
        at lucee.runtime.engine.Request.exe(Request.java:45)
        at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1179)
        at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1125)
        at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
        at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassCastException: class org.hibernate.exception.GenericJDBCException cannot be cast to class java.lang.ThreadDeath (org.hibernate.exception.GenericJDBCException is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @2a332ff8; java.lang.ThreadDeath is in module java.base of loader 'bootstrap')

Don’t forget to tell us about your stack!

OS: Ubuntu : 5.4.0-1071-aws
Java Version: OpenJDK 11
Tomcat Version: 8.5.39.0
Lucee Version: 5.3.8.206

Can you please post the full stacktrace of the error?

@Gavin_Baumanis latest hibernate release version 3.5.5.84. ( Download Lucee )

Do you have a reason to use 3.5.5.75? if not, please update to the latest and check this.

Thanks, But I couldn’t see any hibernate related stuff in the stacktrace. is it that the error occurred in hibernate?

Sorry…
COPY/PASTE error…
I have updated the original message with the first error.
and deleted the follow-up stack-trace, from the thread, to avoid confusion.

Gavin.

2 Likes