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

jimage extract to readonly directory causes MissingResourceException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b157
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        An attempt to run

        % jimage extract --dir some_directory image

        where some_directory has readonly permission the following exception is thrown:

        java.util.MissingResourceException: Can't find resource for bundle jdk.tools.jlink.resources.plugins, key err.cannot.create.dir
        at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:536)
        at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:493)
        at jdk.jlink/jdk.tools.jlink.internal.TaskHelper$ResourceBundleHelper.getMessage(TaskHelper.java:428)
        at jdk.jlink/jdk.tools.jlink.internal.TaskHelper$BadArgs.<init>(TaskHelper.java:79)
        at jdk.jlink/jdk.tools.jlink.internal.TaskHelper$BadArgs.<init>(TaskHelper.java:74)
        at jdk.jlink/jdk.tools.jlink.internal.TaskHelper.newBadArgs(TaskHelper.java:697)
        at jdk.jlink/jdk.tools.jimage.JImageTask.extract(JImageTask.java:289)
        at jdk.jlink/jdk.tools.jimage.JImageTask.iterate(JImageTask.java:421)
        at jdk.jlink/jdk.tools.jimage.JImageTask.run(JImageTask.java:432)
        at jdk.jlink/jdk.tools.jimage.JImageTask.run(JImageTask.java:228)
        at jdk.jlink/jdk.tools.jimage.Main.run(Main.java:48)
        at JImageCliTest.jimage(JImageCliTest.java:78)
        at JImageExtractTest.testExtractToReadOnlyDir(JImageExtractTest.java:149)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:537)
        at JImageCliTest.runTests(JImageCliTest.java:111)
        at JImageExtractTest.main(JImageExtractTest.java:182)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:537)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
        at java.base/java.lang.Thread.run(Thread.java:844)
        java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:537)
        at JImageCliTest.runTests(JImageCliTest.java:111)
        at JImageExtractTest.main(JImageExtractTest.java:182)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:537)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
        at java.base/java.lang.Thread.run(Thread.java:844)

        The same issue appears when instead of a directory a file is specified.

        Tested on jdk 9-ea+144.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dkononenko Denis Kononenko (Inactive)
                  Reporter:
                  dkononenko Denis Kononenko (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: