Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5833

NullPointerException: Cannot invoke "javax.tools.JavaFileObject.isNameCompatible(String, javax.tools.JavaFileObject$Kind)" because "toplevel.sourcefile" is null

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      Hello,

      This problem may have occurred when you moved the file to another package.

      java.lang.NullPointerException: Cannot invoke "javax.tools.JavaFileObject.isNameCompatible(String, javax.tools.JavaFileObject$Kind)" because "toplevel.sourcefile" is nulljava.lang.NullPointerException: Cannot invoke "javax.tools.JavaFileObject.isNameCompatible(String, javax.tools.JavaFileObject$Kind)" because "toplevel.sourcefile" is null at com.sun.tools.javac.comp.Modules.enterModule(Modules.java:330) at com.sun.tools.javac.comp.Modules.enterModules(Modules.java:320) at com.sun.tools.javac.comp.Modules.enter(Modules.java:285) at com.sun.tools.javac.comp.Modules.enter(Modules.java:268) at com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:873) at com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:827) at com.sun.tools.javac.main.JavaCompiler.lambda$new$0(JavaCompiler.java:362) at com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:388) at com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:301) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:684) at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1435) at com.sun.tools.javac.code.Symbol.apiComplete(Symbol.java:690) at com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:864) at com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:799) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:1160) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethod(NPECheck.java:546) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:940) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90) at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:69) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:653) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:546) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:94) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:109) at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:78) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:117) at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:193) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:846) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90) at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:69) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:653) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:546) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:109) at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:78) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:117) at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:148) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:605) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90) at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:69) at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:653) at org.netbeans.modules.java.hints.bugs.NPECheck.computeExpressionsState(NPECheck.java:503) at org.netbeans.modules.java.hints.bugs.NPECheck.methodInvocation(NPECheck.java:308) at jdk.internal.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567)[catch] at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:317) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:798) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:90) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.runAndAdd(HintsInvoker.java:657) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:676) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.visitBinary(TreeScanner.java:647) at com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2129) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.visitParenthesized(TreeScanner.java:595) at com.sun.tools.javac.tree.JCTree$JCParens.accept(JCTree.java:1985) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:94) at com.sun.source.util.TreeScanner.visitTypeCast(TreeScanner.java:662) at com.sun.tools.javac.tree.JCTree$JCTypeCast.accept(JCTree.java:2158) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:94) at com.sun.source.util.TreeScanner.visitVariable(TreeScanner.java:229) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:1016) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:94) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:109) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:117) at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:193) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:846) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:682) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:610) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:109) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:117) at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:148) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:605) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:701) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:245) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:228) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:193) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:166) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:128) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:65) at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273) at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279) at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      

      Please repair.

      Thank you

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:

                Issue deployment