java.lang.reflect.UndeclaredThrowableException

Terracotta Project Issue Tracker | Keith Wong | 5 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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={

    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