Do you have an up-to-date build of NetBeans? This has been fixed by this commit some time ago: https://github.com/apache/netbeans/commit/43338016d661b74317892298d88b0a32663adb05
Jan On Sun, Jul 25, 2021 at 6:40 AM Ty Young <[email protected]> wrote: > Thanks for verifying. > > > Netbeans is even more borked without nb-javac for me. On load, all the > projects that were open are closed except for the parent pom objects. > Attempting to right click on a file under "Projects" on the left side > does nothing. Files under "Projects" are still marked with errors("Error > parsing file"). The editor no longer shows errors but > autocompletion/import suggestions still don't work. > > > I get an error balloon with this exception(SecurityManager related?): > > > java.lang.NoSuchMethodError: 'void > com.sun.tools.javac.util.Log.<init>(com.sun.tools.javac.util.Context, > java.io.PrintWriter, java.io.PrintWriter, java.io.PrintWriter)' > at org.netbeans.lib.nbjavac.services.NBLog.<init>(NBLog.java:55) > at org.netbeans.lib.nbjavac.services.NBLog.<init>(NBLog.java:40) > at org.netbeans.lib.nbjavac.services.NBLog$1.make(NBLog.java:73) > at org.netbeans.lib.nbjavac.services.NBLog$1.make(NBLog.java:70) > at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:149) > at jdk.compiler/com.sun.tools.javac.util.Log.instance(Log.java:234) > at > jdk.compiler/com.sun.tools.javac.main.Arguments.<init>(Arguments.java:120) > at > > jdk.compiler/com.sun.tools.javac.main.Arguments.instance(Arguments.java:112) > at > jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:190) > at > > org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:992) > at > > org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:869) > at > > org.netbeans.modules.java.source.ModuleNames.parseModuleName(ModuleNames.java:296) > at > > org.netbeans.modules.java.source.ModuleNames.getProjectModuleName(ModuleNames.java:280) > at > > org.netbeans.modules.java.source.ModuleNames.getModuleName(ModuleNames.java:118) > at > > org.netbeans.api.java.source.SourceUtils.getModuleName(SourceUtils.java:1319) > at > > org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.lambda$getModulesByName$22(ModuleClassPaths.java:1134) > at > > java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) > at > > java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) > at > > java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) > at > > java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) > at > > java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) > at > > java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) > at > > java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) > at > > java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > > java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) > at > > org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getModulesByName(ModuleClassPaths.java:1133) > at > > org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(ModuleClassPaths.java:746) > 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.getRoots(ClassPath.java:248) > at > > org.netbeans.modules.java.source.indexing.APTUtils.listenOnProcessorPath(APTUtils.java:337) > at > > org.netbeans.modules.java.source.indexing.APTUtils.listen(APTUtils.java:323) > at > > org.netbeans.modules.java.source.indexing.APTUtils.create(APTUtils.java:232) > at > org.netbeans.modules.java.source.indexing.APTUtils.get(APTUtils.java:177) > at > > org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:846) > at > > org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:428) > at > > org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:626) > at > > org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:399) > at > > org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:88) > at > > org.netbeans.modules.java.source.JavaSourceUtilImpl$1.parseModule(JavaSourceUtilImpl.java:290) > at > > org.netbeans.modules.java.preprocessorbridge.api.ModuleUtilities.parseModule(ModuleUtilities.java:80) > at > > org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(ModuleClassPaths.java:844) > 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.modules.jshell.project.ShellProjectUtils.to2Roots(ShellProjectUtils.java:125) > at > > org.netbeans.modules.jshell.project.ShellProjectUtils.findPlatform(ShellProjectUtils.java:113) > at > > org.netbeans.modules.jshell.project.ShellProjectUtils.findPlatform(ShellProjectUtils.java:418) > at > org.netbeans.modules.jshell.project.REPLAction2.enable(REPLAction2.java:59) > at > > org.netbeans.modules.project.ui.actions.ProjectAction$3.run(ProjectAction.java:193) > at > > org.netbeans.modules.project.ui.actions.ProjectAction.refresh(ProjectAction.java:216) > at > > org.netbeans.modules.project.ui.actions.LookupSensitiveAction.doRefresh(LookupSensitiveAction.java:172) > at > > org.netbeans.modules.project.ui.actions.LookupSensitiveAction.getValue(LookupSensitiveAction.java:104) > at > > org.netbeans.modules.project.ui.actions.ProjectAction.getValue(ProjectAction.java:50) > at > > org.netbeans.modules.project.ui.actions.ProjectAction.createContextAwareInstance(ProjectAction.java:231) > at org.openide.util.Utilities.actionsToPopup(Utilities.java:1694) > at org.openide.util.Utilities.actionsToPopup(Utilities.java:1790) > at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1041) > at > > org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1538) > at > > org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:168) > at > > org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:159) > at > > java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288) > at > > java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287) > at > > java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287) > at > java.desktop/java.awt.Component.processMouseEvent(Component.java:6623) > at > java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389) > at java.desktop/java.awt.Component.processEvent(Component.java:6391) > at java.desktop/java.awt.Container.processEvent(Container.java:2266) > at > java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001) > at > java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) > at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) > at > > java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) > at > > java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572) > at > > java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) > at > java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) > at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780) > at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) > at > java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) > at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) > at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716) > at > > java.base/java.security.AccessController.doPrivileged(AccessController.java:399) > at > > java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) > at > > java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) > at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746) > at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744) > at > > java.base/java.security.AccessController.doPrivileged(AccessController.java:399) > at > > java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) > at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743) > 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) > > > On 7/24/21 11:22 PM, Jan Lahoda wrote: > > Hi Ty, > > > > Sorry, I missed this e-mail. I just tried a build from the current > NetBeans > > master and Panama's foreign-memaccess+abi branch, using a simple Maven > > project. I can see the problem, but only with nb-javac installed. Given > > nb-javac is based on the last released JDK (i.e. JDK 16) and Panama is > JDK > > 18, I think I'd recommend (fully) uninstalling nb-javac when working on > > Panama. > > > > Jan > > > > > > On Sun, Jul 25, 2021 at 4:08 AM Ty Young <[email protected]> wrote: > > > >> Where you able to reproduce it by any chance? > >> > >> > >> On 7/13/21 10:18 AM, Ty Young wrote: > >>> You may need to build from this branch, which I use: > >>> > >>> > >>> https://github.com/openjdk/panama-foreign/tree/foreign-memaccess+abi > >>> > >>> > >>> The default branch "foreign-jextract" is based on > >>> foreign-memaccess+abi and is updated less often. > >>> > >>> > >>> This build is then used as the system JDK(AKA JAVA_HOME). The project > >>> is using Maven, if that matters. > >>> > >>> > >>> On 7/13/21 1:10 AM, Jan Lahoda wrote: > >>>> Hi Ty, > >>>> > >>>> Do you have more information on how to reproduce (i.e. how to setup > >>>> the IDE > >>>> and the projects to see the problem). I tried to run a (very) recent > >>>> build > >>>> on the Panama branch, and create a simple project, and I didn't see > the > >>>> FatalError, so there is something other I need to do. > >>>> > >>>> Thanks, > >>>> Jan > >>>> > >>>> > >>>> On Sun, Jul 11, 2021 at 4:12 AM Ty Young <[email protected]> > wrote: > >>>> > >>>>> > > >>>>> > >>>>> > >>>>> Hi, > >>>>> > >>>>> > >>>>> I use JDK 18 builds of Project Panama[1] that Netbeans does not work > >>>>> properly with. All classes with JDK 18 have errors with the package > >>>>> statement claiming that: > >>>>> > >>>>> > >>>>> Cannot access java.lang > >>>>> > >>>>> Fatal Error: Unable to find package java.lang in classpath or > >>>>> bootclasspath. > >>>>> > >>>>> > >>>>> This happens even on the "dev" builds of Netbeans[2]. My JavaFX > >>>>> application and all dependency projects compile and run fine. Code > >>>>> completion and import suggestions are broken, Netbeans views some > >>>>> imports as unused when they are being used, and symbols(classes) are > >>>>> marked as "cannot be found" even though they have imports. > >>>>> > >>>>> > >>>>> [1] https://github.com/openjdk/panama-foreign. Technically PR source > >>>>> here: > >> https://github.com/mcimadamore/panama-foreign/tree/handle_address > >>>>> > >>>>> [2] https://ci-builds.apache.org/job/Netbeans/job/netbeans-linux/ > >>>>> > >>>>> > >>>>> --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: [email protected] > >>>>> For additional commands, e-mail: [email protected] > >>>>> > >>>>> For further information about the NetBeans mailing lists, visit: > >>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >>>>> > >>>>> > >>>>> > >>>>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> For further information about the NetBeans mailing lists, visit: > >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >> > >> > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > >
