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

Using localStorage in WebEngine throws "DOM Exception 18"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 8
    • javafx
    • Ubuntu 12.04, x64
      JDK 8 b109, JavaFX Lombard b109

    • web

      When using localStorage anyway, getting "DOM Exception 18":

      java.lang.reflect.InvocationTargetException
      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 com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:351)
      at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)
      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 sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:754)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:868)
      at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:55)
      at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:157)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: netscape.javascript.JSException: Error: SecurityError: DOM Exception 18
      at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128)
      at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
      at com.sun.webkit.WebPage.executeScript(WebPage.java:1410)
      at javafx.scene.web.WebEngine.executeScript(WebEngine.java:934)
      at localstoragefailsexample.LocalStorageFailsExample.start(LocalStorageFailsExample.java:28)
      at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:811)
      at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331)
      at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297)
      at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294)
      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)
      ... 1 more
      Exception running application localstoragefailsexample.LocalStorageFailsExample


      By the way, if I mention user data directory (engine.setUserDataDirectory(new File("/local/.smth"));), it makes dir within it (localstorage) and throws the same exception.

      see attached simple project

            peterz Peter Zhelezniakov
            dginzbur Dmitry Ginzburg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: