Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-460

ServiceMBeanDelegate.java:170 - 1.2.4.7 - Casts Throwable into Exception causes ClassCastException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EJB 3.0 RC6 - PFD
    • EJB 3.0 RC5 - PFD
    • None
    • None

      public Object invoke(String actionName, Object params[], String signature[])
      throws MBeanException, ReflectionException
      {
      Method operation = getOperation(actionName, signature);
      try

      { return container.localInvoke(operation, params); }

      catch (Throwable t)

      { --> throw new MBeanException((Exception) t); }

      }

      This causes an error when the Throwable is an Error.

      Recommend:
      throw new MBeanException(t instanceof Exception ? (Exception) t : new Exception(t));

      I'm having a problem and can't diagnose it becuase the real cause is being hidden because a ClassCastException is overriding the original exception.

              patriot1burke@gmail.com Bill Burke (Inactive)
              mnewcomb_jira Michael Newcomb (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 minute
                  1m
                  Remaining:
                  Remaining Estimate - 1 minute
                  1m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified