java.lang.reflect.UndeclaredThrowableException

Terracotta | kwong | 5 years ago
  1. 0

    When there is db problem in between Quartz operations, the following exception could be found {noformat} [10/8/11 2:42:23:349 HKT] 000006f6 JobStoreTX E org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager manage ClusterManager: Error managing cluster: null java.lang.reflect.UndeclaredThrowableException at $Proxy9.rollback(Unknown Source) at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:3503) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3084) at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3713) at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3749) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:71) ... 5 more Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed. at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:2617) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.rollback(WSJdbcConnection.java:2584) ... 10 more {noformat} The AttributeRestoringConnectionInvocationHandler wrapped a javax.sql.Connection in a proxy. When a method in javax.sql.Connection is invoked, the original SQLException is not rethrew back and thus makes the caller confused. So, I suggest the following in AttributeRestoringConnectionInvocationHandler.java to get the SQLException back: {code:title=AttributeRestoringConnectionInvocationHandler.java|borderStyle=solid} public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("setAutoCommit")) { setAutoCommit(((Boolean)args[0]).booleanValue()); } else if (method.getName().equals("setTransactionIsolation")) { setTransactionIsolation(((Integer)args[0]).intValue()); } else if (method.getName().equals("close")) { close(); } else { try { return method.invoke(conn, args); } catch (InvocationTargetException e) { throw e.getCause() != null ? e.getCause() : e; } } return null; } {code}

    Terracotta Project Issue Tracker | 5 years ago | Keith Wong
    java.lang.reflect.UndeclaredThrowableException
  2. 0

    When there is db problem in between Quartz operations, the following exception could be found {noformat} [10/8/11 2:42:23:349 HKT] 000006f6 JobStoreTX E org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager manage ClusterManager: Error managing cluster: null java.lang.reflect.UndeclaredThrowableException at $Proxy9.rollback(Unknown Source) at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:3503) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3084) at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3713) at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3749) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:71) ... 5 more Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed. at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:2617) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.rollback(WSJdbcConnection.java:2584) ... 10 more {noformat} The AttributeRestoringConnectionInvocationHandler wrapped a javax.sql.Connection in a proxy. When a method in javax.sql.Connection is invoked, the original SQLException is not rethrew back and thus makes the caller confused. So, I suggest the following in AttributeRestoringConnectionInvocationHandler.java to get the SQLException back: {code:title=AttributeRestoringConnectionInvocationHandler.java|borderStyle=solid} public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getName().equals("setAutoCommit")) { setAutoCommit(((Boolean)args[0]).booleanValue()); } else if (method.getName().equals("setTransactionIsolation")) { setTransactionIsolation(((Integer)args[0]).intValue()); } else if (method.getName().equals("close")) { close(); } else { try { return method.invoke(conn, args); } catch (InvocationTargetException e) { throw e.getCause() != null ? e.getCause() : e; } } return null; } {code}

    Terracotta Project Issue Tracker | 5 years ago | Keith Wong
    java.lang.reflect.UndeclaredThrowableException
  3. 0

    Wrapped Exception in AttributeRestoringConnectionInvocationHandler

    Terracotta | 5 years ago | kwong
    java.lang.reflect.UndeclaredThrowableException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IBM Connections Forum : Problem with Configuring IBM Connections Content Manager for Libraries: createObjectStore.sh fails

    lotus.com | 1 year ago
    com.filenet.api.exception.EngineRuntimeException: FNRCD0009E: DB_ERROR: The database access failed with the following error: ErrorCode 0, Message 'DSRA9110E: Connection wurde geschlossen.' ObjectStore: "ICObjectStore" failedBatchItem=0 errorStack={
  6. 0

    Basically the flow is like Search page Listing page Details pages - with pagination which displays the next & previousand also with a refresh. Lookup records are used for details page, from the 1st details page - if navigated using next or previous (record details) or refresh for more then 2 + times the error occurs:: for getting this lookup a new Session serves for every request. net.sf.hibernate.exception.GenericJDBCException: Could not execute query[/list] code:: Query query = session.createQuery("from LookupsDTO l order by l.lookupsPK.codeGroup, l.m_seq"); List lookups = query.list(); LOOKUP mapping :: <class name="LookupsDTO" table="LOOKUPS" dynamic-insert="true"> <composite-id name="lookupsPK" class="com.freightliner.mdi.dto.pk.LookupsPK"> <key-property name="codeGroup" column="CODE_GROUP" type="string"/> <key-property name="code" column="CODE" type="string"/> </composite-id> <version name="hibVers" column="HIB_VERS" type="integer"/> <property name="m_description" column="DESCRIPTION" type="string" access="field" /> <property name="m_seq" column="SEQ" type="integer" access="field" /> <property name="m_default" column="DEFAULT" type="character" access="field" /> <property name="m_userId" column="USER_ID" type="string" access="field" /> <property name="m_updateDateTs" column="UPDATE_DATE_TS" type="timestamp" access="field" /> </class> Error:: JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: null [10/11/05 11:59:00:125 PDT] 54e8c411 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter DSRA9110E: Connection is closed. [10/11/05 11:59:00:125 PDT] 54e8c411 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: null [10/11/05 11:59:00:141 PDT] 54e8c411 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter DSRA9110E: Connection is closed. net.sf.hibernate.exception.GenericJDBCException: Could not execute query at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:81) at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30) at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39) at com.freightliner.mdi.dto.map.BaseLookupsMap.init(BaseLookupsMap.java:87) at com.freightliner.mdi.dto.map.BaseLookupsMap.reload(BaseLookupsMap.java:71) at com.freightliner.mdi.web.ui.forecastmanager.ForecastManagerAction.getDpForecastInformation(ForecastManagerAction.java:307) at com.freightliner.mdi.web.ui.forecastmanager.ForecastManagerAction.getForecast(ForecastManagerAction.java:190) at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at com.freightliner.mdi.web.application.MdiActionServlet.doPost(MdiActionServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76) at com.freightliner.mdi.web.membershipservices.MdiAccessFilter.doFilter(MdiAccessFilter.java:257) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672) Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed. at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:1883) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1501) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1424) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:260) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:235) at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:66) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:779) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:265) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.doList(Loader.java:1033) at net.sf.hibernate.loader.Loader.list(Loader.java:1024) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1553) ... 41 more

    Hibernate JIRA | 1 decade ago | Pradeep Bhoopalan
    net.sf.hibernate.exception.GenericJDBCException: Could not execute query

    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. com.ibm.websphere.ce.cm.ObjectClosedException

      DSRA9110E: Connection is closed.

      at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed()
    2. com.ibm.ws
      WSJdbcConnection.rollback
      1. com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:2617)
      2. com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.rollback(WSJdbcConnection.java:2584)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    4. quartz
      AttributeRestoringConnectionInvocationHandler.invoke
      1. org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:71)
      1 frame
    5. Unknown
      $Proxy9.rollback
      1. $Proxy9.rollback(Unknown Source)
      1 frame
    6. quartz
      JobStoreSupport$ClusterManager.run
      1. org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:3503)
      2. org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3084)
      3. org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3713)
      4. org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3749)
      4 frames