Author Topic: UndeclaredThrowableException  (Read 59116 times)

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
UndeclaredThrowableException
« on: May 10, 2012, 06:55:52 PM »
One of our classes caught and logged the following exception.  It looks like AjaxSwingThreadGroup shutdown caused a Hibernate thread to stop (we use Hibernate open source library for JDBC).

2012/05/02 18:30:07 Exception: "java.lang.reflect.UndeclaredThrowableException
                at $Proxy0.beginTransaction(Unknown Source)
                at com.cleo.lexicom.hibernate.utils.DB.isApplicationEnabled(DB.java:525)
                at com.cleo.lexicom.hibernate.utils.DB.isOpAuditTrailApplicationEnabled(DB.java:512)
                at com.cleo.lexicom.LogOpAuditTrail.OpAuditTrailEnabled(LogOpAuditTrail.java:122)
                at com.cleo.lexicom.beans.OpAuditTrail.logEvent(OpAuditTrail.java:220)
                at com.cleo.lexicom.beans.OpAuditTrail.logEvent(OpAuditTrail.java:215)
                at com.cleo.lexicom.LexiCom.close(LexiCom.java:5477)
                at com.cleo.lexicom.LexiCom.close(LexiCom.java:5471)
                at com.cleo.lexicom.LexiCom$Shutdown.run(LexiCom.java:6262)
                at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344)
                ... 10 more
Caused by: java.lang.ThreadDeath
                at java.lang.Thread.stop(Unknown Source)
                at java.lang.ThreadGroup.stopOrSuspend(Unknown Source)
                at java.lang.ThreadGroup.stop(Unknown Source)
                at com.creamtec.ajaxswing.core.AjaxSwingThreadGroup.shutdown(AjaxSwingThreadGroup.java:106)
                at com.creamtec.ajaxswing.core.ClientAgent.doShutdown(ClientAgent.java:362)
                at com.creamtec.ajaxswing.core.ClientAgent$1.run(ClientAgent.java:315)
                ... 1 more"

Dev Team

  • Customer
  • Hero Member
  • *
  • Posts: 593
    • View Profile
Re: UndeclaredThrowableException
« Reply #1 on: May 11, 2012, 12:57:58 PM »
Is it reproducible? There are many reasons why hibernate might disconnected from DB, or DB went down, and saving value on shutdown could be just first DB operation after that fail.

Also UndeclaredThrowableException might appear if some libraries are missing for hibernate, did you recently change and libraries used?

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: UndeclaredThrowableException
« Reply #2 on: May 11, 2012, 02:38:41 PM »
A customer reported seeing it once.  It is not reproducible.

We'll add code to catch on our side.