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

NullPointerException and other problems on loading 2nd modular app

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.0
    • 10.0
    • None
    • None
    • Oracle Linux Server release 6.5

    Description

      1. Preparatory to testing, delete .netbeans folder and netbeans folder.
      2. Unzip 10vc1, creating netbeans folder in home dir
      3. Untar sample projects to NetBeansProject folder in home dir
      4. Startup NetBeans with this command: ./netbeans/bin/netbeans --jdkhome /home/oracle/jdk-11.0.1/
      5. Load the Test project in NetBeansProjects. It should load and run correctly (though it does show a red error marker very briefly while loading.
      6. Load the project Sol_06_03_TeamGameManager (from NetBeansProjects). NullPointerException encountered.
      7. Cancel popup window and attempt to run Sol_06_03_TeamGameManager. results in UnsupportedOperationException.
      8. Shutdown and restart NetBeans. Now Sol_06_03_TeamGameManager runs correctly, but the Test application has an error - it doesn't recognize inferred local variables (var) in a lambda expression.

      Here are the stacktraces for the NullPointerException and UnsupportedOperationException:

      java.lang.NullPointerException
      at jdk.compiler/com.sun.tools.javac.code.Symtab.lookupPackage(Symtab.java:666)
      at jdk.compiler/com.sun.tools.javac.code.Symtab.packageExists(Symtab.java:745)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$HeaderPhase.runPhase(TypeEnter.java:844)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.doCompleteEnvs(TypeEnter.java:282)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:251)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:266)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:266)
      at jdk.compiler/com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:198)
      at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
      at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1326)
      at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:583)
      at org.netbeans.lib.nbjavac.services.NBJavadocEnter.main(NBJavadocEnter.java:67)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1066)
      at org.netbeans.modules.java.hints.spiimpl.Utilities.constructScope(Utilities.java:764)
      at org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler.compile(PatternCompiler.java:38)
      at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.doComputeHints(HintsInvoker.java:535)
      at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:283)
      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)
      [catch] 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)

      java.lang.UnsupportedOperationException: command: run, JavaRunner impls: [org.netbeans.modules.java.source.ant.ProjectRunnerImpl@1837539f]
      at org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:303)
      at org.netbeans.modules.java.api.common.project.ActionProviderSupport.bypassAntBuildScript(ActionProviderSupport.java:583)
      at org.netbeans.modules.java.api.common.project.JavaActionProvider$9.performCompileOnSave(JavaActionProvider.java:1591)
      at org.netbeans.modules.java.api.common.project.ActionProviderSupport$JavaModelWork.execute(ActionProviderSupport.java:1308)
      at org.netbeans.modules.java.api.common.project.ActionProviderSupport$JavaModelWork.run(ActionProviderSupport.java:1285)
      at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:133)
      at org.netbeans.modules.java.api.common.project.ActionProviderSupport.invokeTarget(ActionProviderSupport.java:202)
      at org.netbeans.modules.java.api.common.project.JavaActionProvider$ScriptAction.invoke(JavaActionProvider.java:465)
      at org.netbeans.modules.java.api.common.project.JavaActionProvider.lambda$invokeAction$1(JavaActionProvider.java:895)
      at java.base/java.util.Optional.ifPresent(Optional.java:183)
      at org.netbeans.modules.java.api.common.project.JavaActionProvider.invokeAction(JavaActionProvider.java:888)
      at org.netbeans.spi.project.support.LookupProviderSupport$MergedActionProvider.invokeAction(LookupProviderSupport.java:262)
      at org.netbeans.modules.project.ui.actions.ProjectAction$2.run(ProjectAction.java:162)
      at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95)
      at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.writeAccess(NbMutexEventProvider.java:60)
      at org.netbeans.modules.openide.util.LazyMutexImplementation.writeAccess(LazyMutexImplementation.java:56)
      at org.openide.util.Mutex.writeAccess(Mutex.java:285)
      at org.netbeans.modules.project.ui.actions.ProjectAction.runSequentially(ProjectAction.java:159)
      at org.netbeans.modules.project.ui.actions.MainProjectAction$1$1.run(MainProjectAction.java:115)
      at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
      [catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

      Attachments

        1. sampleApps.tar
          800 kB
          Kenny

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kennys Kenny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: