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

ScriptException/TypeError thrown during 'eval' of class level import

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8u211
    • Fix Version/s: None
    • Component/s: core-libs

      Description

      Submitter reporting following exception:

      javax.script.ScriptException: TypeError: [object JavaPackage] is not a Java class in nashorn:mozilla_compat.js at line number 379 at column number 16
      at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:451)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
      at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
      at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
      at oracle.adfinternal.view.faces.bi.renderkit.common.BaseImageConverterUtils$JDKScriptHelper.evaluate(BaseImageConverterUtils.java:326)
      at oracle.adfdtinternal.dvt.datapresdt.binding.utils.ChartDataUtils$ChartScriptHelper.evaluate(ChartDataUtils.java:1175)
      at oracle.adfinternal.view.faces.bi.renderkit.common.BaseImageConverterUtils$JDKScriptHelper.importJavaPackages(BaseImageConverterUtils.java:490)
      at oracle.adfinternal.view.faces.bi.renderkit.common.BaseImageConverterUtils$JDKScriptHelper.loadStaticJavascript(BaseImageConverterUtils.java:337)
      at oracle.adfinternal.view.faces.bi.renderkit.common.BaseImageConverterUtils$JDKScriptHelper.getSVG(BaseImageConverterUtils.java:226)
      at oracle.adfinternal.view.faces.bi.renderkit.common.BaseImageConverterUtils$JDKScriptHelper.getSVG(BaseImageConverterUtils.java:239)
      at oracle.adfdtinternal.dvt.datapresdt.binding.utils.ChartDataUtils.getSVG(ChartDataUtils.java:1062)
      at oracle.adfdtinternal.model.dvt.ide.objects.bindPanels.rowset.CommonBarChartPanel.getDefaultImage(CommonBarChartPanel.java:536)
      at oracle.adfdtinternal.model.dvt.ide.objects.bindPanels.rowset.JSBarChartPanel.createInteractiveImage(JSBarChartPanel.java:118)
      at oracle.adfdtinternal.model.dvt.ide.objects.bindPanels.rowset.CommonChartPanel$2.doInBackground(CommonChartPanel.java:570)
      at oracle.adfdtinternal.model.dvt.ide.objects.bindPanels.rowset.CommonChartPanel$2.doInBackground(CommonChartPanel.java:564)
      at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at javax.swing.SwingWorker.run(SwingWorker.java:334)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: nashorn:mozilla_compat.js:379:16 TypeError: [object JavaPackage]
      is not a Java class
      at jdk.nashorn.internal.objects.NativeError.initException(NativeError.java:137)
      at jdk.nashorn.internal.objects.NativeTypeError.<init>(NativeTypeError.java:73)
      at jdk.nashorn.internal.objects.NativeTypeError.<init>(NativeTypeError.java:77)
      at jdk.nashorn.internal.objects.NativeTypeError.constructor(NativeTypeError.java:98)
      at jdk.nashorn.internal.scripts.Script$Recompilation$79$10637A$\=nashorn\!mozilla_compat.value-28(nashorn:mozilla_compat.js:379)
      at jdk.nashorn.internal.scripts.Script$117$\^eval\_.:program(<eval>:1)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:623)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
      ... 21 more


      On debugging, we found that issue is caused by the following classimport that
      we have
      importClass(Packages.oracle.adfinternal.view.faces.bi.util.ModelUtils);

        Attachments

          Activity

            People

            • Assignee:
              coffeys Sean Coffey
              Reporter:
              shadowbug Shadow Bug
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: