Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7051182

Regression: : jconsole scripting demo fails with UndeclaredThrowableException

    Details

      Description

      REGRESSION
      ----------
      Not reproducible with JDK 7 b125 and earlier.
      Not reproducible with JDK 6.
      Licensee suspects CR 6980447, which was fixed in JDK 7 b126.

      SYNOPSIS
      --------
      Regression: jconsole scripting demo fails with UndeclaredThrowableException

      OPERATING SYSTEM
      ----------------
      All (tested on Windows and Linux)

      FULL JDK VERSION
      ----------------
      JDK 7 b126 onwards
      Not reproducible with Java 6


      REPRODUCTION INSTRUCTIONS
      -------------------------
      1. Run jconsole as follows:

         jconsole -pluginpath <%JAVA_HOME%>\demo\scripting\jconsole-plugin\jconsole-plugin.jar

      2. Select the jconsole process (Local Process
         sun.tools.jconsole.JConsole -pluginpath jconsole-plugin.jar)
         and click on 'Connect' button.

      3. Select 'Script Shell' tab

      4. Type "help()" at the prompt and hit return

      Expected behaviour:
      Usage information should be printed.

      Observed behaviour:
      A console window appears, containing lots of instances of the following Exception:

      Exception in thread "AWT-EventQueue-0" java.lang.reflect.UndeclaredThrowableException
              at $Proxy7.run(Unknown Source)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:660)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      Caused by: java.security.PrivilegedActionException: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method javax.swing.JComponent.print(string). (<built-in jconsole.js>#781) in <built-in jconsole.js> at line number 781
              at java.security.AccessController.doPrivileged(AccessController.java:294)
              at com.sun.script.util.InterfaceImplementor$InterfaceImplementorInvocationHandler.invoke(InterfaceImplementor.java:66)
              ... 9 more
      Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method javax.swing.JComponent.print(string). (<built-in jconsole.js>#781) in <built-in jconsole.js> at line number 781
              at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:226)
              at com.sun.script.javascript.RhinoScriptEngine.invokeMethod(RhinoScriptEngine.java:192)
              at com.sun.script.util.InterfaceImplementor$InterfaceImplementorInvocationHandler$1.run(InterfaceImplementor.java:71)
              at java.security.AccessController.doPrivileged(AccessController.java:288)
              ... 10 more
      Caused by: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method javax.swing.JComponent.print(string). (<built-in jconsole.js>#781)
              at sun.org.mozilla.javascript.internal.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
              at sun.org.mozilla.javascript.internal.Context.reportRuntimeError(Context.java:962)
              at sun.org.mozilla.javascript.internal.Context.reportRuntimeError(Context.java:1018)
              at sun.org.mozilla.javascript.internal.Context.reportRuntimeError1(Context.java:981)
              at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(NativeJavaMethod.java:166)
              at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:1711)
              at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:854)
              at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:164)
              at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:429)
              at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:3163)
              at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:162)
              at com.sun.script.javascript.RhinoScriptEngine.invoke(RhinoScriptEngine.java:220)
              ... 13 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sundar Sundararajan Athijegannathan
                Reporter:
                dkorbel David Korbel (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: