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

FXML: error loading external script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • jdk8 b91, same on Linux and Windows

      try to load fxml files attached.

      javax.script.ScriptException: ReferenceError: "importClass" is not defined in <eval> at line number 1
      at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:417)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:401)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:383)
      at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:126)
      at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
      at javafx.fxml.FXMLLoader$ScriptElement.processStartElement(FXMLLoader.java:1389)
      at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2418)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2229)
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2128)
      at test.fxmltests.app.staticPropertyLoadApp$ExternalScriptCodeSlot.impl_drawNode(staticPropertyLoadApp.java:2600)
      at test.fxmltests.app.staticPropertyLoadApp$TestNodeWithIOExceptionProcessing.drawNode(staticPropertyLoadApp.java:140)
      at test.javaclient.shared.TestNode.draw(TestNode.java:115)
      at test.javaclient.shared.PageWithSlots.drawTo(PageWithSlots.java:72)
      at test.javaclient.shared.CombinedTestChooserPresenter.showTestNode(CombinedTestChooserPresenter.java:133)
      at test.javaclient.shared.AbstractApp2$4.run(AbstractApp2.java:233)
      at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:225)
      at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:222)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:222)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication.access$200(GtkApplication.java:47)
      at com.sun.glass.ui.gtk.GtkApplication$5$1.run(GtkApplication.java:137)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: <eval>:1 ReferenceError: "importClass" is not defined
      at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:66)
      at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:328)
      at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:300)
      at jdk.nashorn.api.scripting.NashornScriptEngine.__noSuchProperty__(NashornScriptEngine.java:246)
      at jdk.nashorn.internal.scripts.Script$engine._L36(nashorn:engine/resources/engine.js:38)
      at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:510)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:202)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:345)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
      ... 22 more
      java.lang.RuntimeException: javax.script.ScriptException: ReferenceError: "handleButtonAction" is not defined in <eval> at line number 1
      at javafx.fxml.FXMLLoader$ScriptEventHandler.handle(FXMLLoader.java:1535)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
      at javafx.event.Event.fireEvent(Event.java:202)
      at javafx.scene.Node.fireEvent(Node.java:7952)
      at javafx.scene.control.Button.fire(Button.java:183)
      at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:183)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:91)
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:84)
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:202)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3632)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3463)
      at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3415)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1692)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2483)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
      at com.sun.glass.ui.View.notifyMouse(View.java:877)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication.access$200(GtkApplication.java:47)
      at com.sun.glass.ui.gtk.GtkApplication$5$1.run(GtkApplication.java:137)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: javax.script.ScriptException: ReferenceError: "handleButtonAction" is not defined in <eval> at line number 1
      at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:417)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:401)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:383)
      at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:134)
      at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
      at javafx.fxml.FXMLLoader$ScriptEventHandler.handle(FXMLLoader.java:1533)
      ... 47 more
      Caused by: <eval>:1 ReferenceError: "handleButtonAction" is not defined
      at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:66)
      at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:328)
      at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:300)
      at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:287)
      at jdk.nashorn.internal.runtime.ScriptObject.noSuchProperty(ScriptObject.java:1980)
      at jdk.nashorn.internal.runtime.ScriptObject.noSuchMethod(ScriptObject.java:1943)
      at jdk.nashorn.internal.runtime.ScriptObject.findGetMethod(ScriptObject.java:1695)
      at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1607)
      at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:75)
      at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
      at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
      at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:138)
      at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:229)
      at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)
      at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:510)
      at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:202)
      at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:345)
      at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
      ... 51 more
      org.jemmy.TimeoutExpiredException: State 'test.fxmltests.functional.staticPropertyLoadTest$9@167a1737' has not been reached in 5000 milliseconds
      at org.jemmy.timing.Waiter.ensureValue(Waiter.java:135)
      at org.jemmy.control.Wrap.waitState(Wrap.java:360)
      at test.fxmltests.functional.staticPropertyLoadTest.externalScriptCodeSlot(staticPropertyLoadTest.java:779)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
      at client.test.runner.CommonTestRunnerWorker.runUI(CommonTestRunnerWorker.java:72)
      at client.test.runner.JUnit2TestRunner.runUI(JUnit2TestRunner.java:55)
      at client.test.runner.CommonTestRunnerWorker$3.run(CommonTestRunnerWorker.java:213)
      at java.lang.Thread.run(Thread.java:724)
      called exit FAIL
      call stopui

        1. RT_30986.patch
          1 kB
          Milan Kubec
        2. external-script.js
          0.1 kB
          Victor Shubov
        3. external-script.fxml
          0.3 kB
          Victor Shubov

            msladecek Martin Sládeček
            vshubov Victor Shubov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: