Hello again Netbeans users,

With great interest I follow this thread (and others), and learned several things. As mentioned by me and others, the de-installation of the nb-javac plugin (which NB suggests to install at the beginning and then regularly) repairs the refactor-renaming so that it works again. Which is excellent.

My project's source-/binary-format is "JDK 11" by the way. Geertjan wrote at one point that the nb-javac plugin was mainly useful for JDK 8 projects.

However now with the uninstalled nb-javac plugin, I regularly experience Null pointer exceptions in NB when I edit a java source file and then either compile it manually (F9) or run the project (F6), where NB first compiles every changed source file (with the gears in its symbol), before it runs the project. I attach the stack trace below.

This is with NB 11.2, Openjdk "11.0.6" 2020-01-14 (from Ubuntu 18 LTS), and my mid-sized project.

Is there a work-around for this problem, too?
Btw, I disabled my activated C++ plugin from NB 8.3 repository, but this doesn't seem to change things.

Greetings,
Hans



-------------------------------------------------------------------------------

java.lang.NullPointerException
    at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassOverrideEqualsAndHash(Check.java:2095)     at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassOverrideEqualsAndHashIfNeeded(Check.java:2085)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4577)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4503)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:951)
    at org.netbeans.lib.nbjavac.services.NBAttr.visitClassDef(NBAttr.java:66)
    at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:774)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.visitAnonymousClassDefinition(Attr.java:2397)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2288)
    at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1689)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
    at jdk.compiler/com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:695)
    at org.netbeans.modules.java.hints.spiimpl.Utilities.attributeTree(Utilities.java:655)     at org.netbeans.modules.java.hints.spiimpl.Utilities.parseAndAttribute(Utilities.java:435)     at org.netbeans.modules.java.hints.spiimpl.Utilities.parseAndAttribute(Utilities.java:349)     at org.netbeans.modules.java.hints.spiimpl.Utilities.parseAndAttribute(Utilities.java:329)     at org.netbeans.modules.java.hints.spiimpl.Utilities.parseAndAttribute(Utilities.java:325)     at org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler.compile(PatternCompiler.java:44)     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)

-------------------------------------------------------------------------------



Am 17.02.20 um 11:47 schrieb Thomas Kellerer:
Hans Grimmselshausen schrieb am 17.02.2020 um 11:41:
With Netbeans 11.2 (but also with 11.0) running in OpenJDK 11.0.6 on
Ubuntu 18 LTS, for some time I experience a lot of problems when I
try to refactor-rename public variables and functions in my mid-sized
project. Mostly but not always, I then get the following error:

--- Module Java Refactoring threw
java.util.ConcurrentModificationException. Please report a bug
against Java Refactoring module and attach your
var/log/messages.log. ---

My Ant based project has been created with Netbeans 9 or 10 (where
refactor-rename worked), and has about 60 Java source files,
including many Swing classes made with Netbeans designer (i.e. where
for a source.java file there's a matching source.form file).

I deleted the Netbeans cache folder, tried a new Netbeans user
profile, created a new (Ant based) Netbeans project and copied all my
source files to the new project's src folder. But with no success.

Do you fellow Netbeans users know of problems with the refactoring
module?

You need to uninstall the nb-javac library, then refactoring works again.

I still get it with 11.3-beta3 as long as nb-javac is installed

Note that just disabling nb-javac is not enough.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to