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

javax.script.ScriptException: sun.misc.InvalidJarIndexException: Invalid index

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx2.1
    • Fix Version/s: 7u6
    • Component/s: deploy
    • Labels:
    • Environment:

      Windows 7, x86

      Description

      I'm using Netbeans 7.1.2 to deploy a JavaFX application.

      In my application, i use Rhino to call some Java Code like this:
      Packages.com.ht.ActionUtil.fromScript();

      it works well in netbeans, but after i deploy it to a jar file, when i try to run it, it throws a Exception :

      javax.script.ScriptException: sun.misc.InvalidJarIndexException: Invalid index
      at com.sun.script.javascript.RhinoCompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
      at javax.script.CompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
      at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.exeuteScript(ShowMenuAction.java:162) [ht-web-client.jar:1.0]
      at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.access$200(ShowMenuAction.java:100) [ht-web-client.jar:1.0]
      at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel$2.run(ShowMenuAction.java:151) [ht-web-client.jar:1.0]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_31]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_31]
      at java.lang.Thread.run(Unknown Source) [na:1.6.0_31]
      Caused by: sun.misc.InvalidJarIndexException: Invalid index
      at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
      at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
      at sun.misc.URLClassPath.getResource(Unknown Source) ~[na:1.6.0_31]
      at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.6.0_31]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
      at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.6.0_31]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.Kit.classOrNull(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.NativeJavaPackage.getPkgProperty(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.NativeJavaPackage.get(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.ScriptableObject.getProperty(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.Interpreter.interpret(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.InterpretedFunction.call(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(Unknown Source) ~[na:1.6.0_31]
      at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(Unknown Source) ~[na:1.6.0_31]
      at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(Unknown Source) ~[na:1.6.0_31]
      at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(Unknown Source) ~[na:1.6.0_31]
      ... 8 common frames omitted

        Attachments

        1. dist.7z
          2.29 MB
        2. RhinoTest.7z
          1.68 MB

          Activity

            People

            • Assignee:
              kcr Kevin Rushforth
              Reporter:
              cbojfx Chengwen Bo (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: