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

Can't open Java modular (JPMS) projects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 9.0
    • 9.0
    • None

    Description

      I'm unable to open Java modular projects.

      Clone the following sample project migrated to Java 10 modules and try to open in NetBeans Dev RC1:

      https://github.com/panga/spring-petclinic/

      Info:

      Product Version = Apache NetBeans IDE Dev (Build incubator-netbeans-release-302-on-20180517)
      Operating System = Mac OS X version 10.13.3 running on x86_64
      Java; VM; Vendor = 10; Java HotSpot(TM) 64-Bit Server VM 10+46; Oracle Corporation
      Runtime = Java(TM) SE Runtime Environment 10+46
      

      Stacktrace:

       

      java.lang.IllegalArgumentException: Already listening to /spring-petclinic/src/main/resources/module-info.java
      new listener : org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation@63ac0828
      holder listener: org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation@63ac0828
       at org.openide.filesystems.FileChangeImpl.addFileChangeListenerImpl(FileChangeImpl.java:214)
       at org.openide.filesystems.FileUtil.addFileChangeListener(FileUtil.java:271)
       at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.lambda$getResources$15(ModuleClassPaths.java:930)
       at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1492)
       at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
       at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(ModuleClassPaths.java:930)
       at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
       at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getResources(MuxClassPathImplementation.java:90)
       at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:769)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:838)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:848)
       at org.netbeans.modules.java.source.parsing.JavacParser.dumpSource(JavacParser.java:1158)
       at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:646)
       at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:361)
       at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:84)
       at org.netbeans.modules.maven.queries.UnitTestsCompilerOptionsQueryImpl$ResultImpl.lambda$getModuleName$2(UnitTestsCompilerOptionsQueryImpl.java:290)
       at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:501)
       at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
       at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
       at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
       at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
       at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
       at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
       at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
       at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
       at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
       at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
       at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
       at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:451)
       at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:422)
       at org.netbeans.modules.maven.queries.UnitTestsCompilerOptionsQueryImpl$ResultImpl.getModuleName(UnitTestsCompilerOptionsQueryImpl.java:289)
       at org.netbeans.modules.maven.queries.UnitTestsCompilerOptionsQueryImpl$ResultImpl.access$200(UnitTestsCompilerOptionsQueryImpl.java:106)
       at org.netbeans.modules.maven.queries.UnitTestsCompilerOptionsQueryImpl$ResultImpl$TestMode$3.createArguments(UnitTestsCompilerOptionsQueryImpl.java:344)
       at org.netbeans.modules.maven.queries.UnitTestsCompilerOptionsQueryImpl$ResultImpl.getArguments(UnitTestsCompilerOptionsQueryImpl.java:155)
       at org.netbeans.spi.java.project.support.CompilerOptionsQueryMerger$CompilerOptionsQueryImpl$ResultImpl.lambda$checkProviders$4(CompilerOptionsQueryMerger.java:184)
       at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
       at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1492)
       at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
       at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
       at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
       at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
       at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
       at org.netbeans.spi.java.project.support.CompilerOptionsQueryMerger$CompilerOptionsQueryImpl$ResultImpl.checkProviders(CompilerOptionsQueryMerger.java:185)
       at org.netbeans.spi.java.project.support.CompilerOptionsQueryMerger$CompilerOptionsQueryImpl$ResultImpl.<init>(CompilerOptionsQueryMerger.java:120)
       at org.netbeans.spi.java.project.support.CompilerOptionsQueryMerger$CompilerOptionsQueryImpl.getOptions(CompilerOptionsQueryMerger.java:87)
       at org.netbeans.modules.java.project.ProjectCompilerOptionsQueryImplementation.lambda$getOptions$1(ProjectCompilerOptionsQueryImplementation.java:38)
       at java.base/java.util.Optional.map(Optional.java:254)
       at org.netbeans.modules.java.project.ProjectCompilerOptionsQueryImplementation.getOptions(ProjectCompilerOptionsQueryImplementation.java:38)
       at org.netbeans.api.java.queries.CompilerOptionsQuery.getOptions(CompilerOptionsQuery.java:58)
       at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getCompilerOptions(ModuleClassPaths.java:1088)
       at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getPatches(ModuleClassPaths.java:1118)
       at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(ModuleClassPaths.java:711)
       at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
       at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getResources(MuxClassPathImplementation.java:90)
       at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:769)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:838)
       at org.netbeans.api.java.classpath.ClassPath.toString(ClassPath.java:848)
       at org.netbeans.modules.parsing.impl.indexing.LogContext.addPaths(LogContext.java:891)
       at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:941)
       at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:929)
       at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:68)
       at org.netbeans.modules.parsing.impl.indexing.PathRegistry$Listener.pathsAdded(PathRegistry.java:1204)
       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:564)
       at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:462)
       at com.sun.proxy.$Proxy2.pathsAdded(Unknown Source)
       at org.netbeans.api.java.classpath.GlobalPathRegistry.register(GlobalPathRegistry.java:205)
       at org.netbeans.modules.maven.ProjectOpenedHookImpl.projectOpened(ProjectOpenedHookImpl.java:155)
       at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
      [catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1273)
       at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1354)
       at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:798)
       at org.netbeans.modules.project.ui.OpenProjectList$6.run(OpenProjectList.java:650)
       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)

       

      Attachments

        Issue Links

          Activity

            People

              tzezula Tomas Zezula
              panga Leonardo Zanivan
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h