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

jshell throw Exception at startup at windows when run as normal user?

XMLWordPrintable

    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      When I run jshell 17 / 19 in windows powershell as normal user, jshell throws exception as following.

      But it's ok when I run as administrator or first cd to the jshell's bin path or when I use jshell 11.

      Update: run with jshell --no-startup the internalError disappeared at startup, but when I type import java.util.ArrayList; in jshell and type enter, jshell exits with same the error as following.

      ```
      Exception in thread "main" java.lang.InternalError: Exception during analyze - java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Scope$StarImportScope.isFilled()" because "tree.starImportScope" is null
              at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.analyze(TaskFactory.java:415)
              at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.<init>(TaskFactory.java:406)
              at jdk.jshell/jdk.jshell.TaskFactory.lambda$analyze$1(TaskFactory.java:178)
              at jdk.jshell/jdk.jshell.TaskFactory.lambda$runTask$4(TaskFactory.java:213)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskPool.getTask(JavacTaskPool.java:193)
              at jdk.jshell/jdk.jshell.TaskFactory.runTask(TaskFactory.java:206)
              at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:175)
              at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:161)
              at jdk.jshell/jdk.jshell.Eval.compileAndLoad(Eval.java:1060)
              at jdk.jshell/jdk.jshell.Eval.declare(Eval.java:893)
              at jdk.jshell/jdk.jshell.Eval.eval(Eval.java:140)
              at jdk.jshell/jdk.jshell.JShell.eval(JShell.java:493)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSource(JShellTool.java:3624)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processSourceCatchingReset(JShellTool.java:1348)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processInput(JShellTool.java:1246)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1217)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1178)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:1125)
              at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:951)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:261)
              at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
      Caused by: java.lang.IllegalStateException: java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Scope$StarImportScope.isFilled()" because "tree.starImportScope" is null
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:383)
              at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.analyze(TaskFactory.java:412)
              ... 20 more
      Caused by: java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Scope$StarImportScope.isFilled()" because "tree.starImportScope" is null
              at jdk.compiler/com.sun.tools.javac.comp.TypeEnter.ensureImportsChecked(TypeEnter.java:170)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:628)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:588)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1042)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:399)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$analyze$1(JavacTaskImpl.java:379)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
              at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:379)
              ... 21 more

      ```


      REGRESSION : Last worked in version 11


      FREQUENCY : always


            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: