Recently, trying to use NetBeans 10 in Ubuntu 18.04 and it showed an error message at start:
Activation failed: StandardModule:org.netbeans.modules.db jarFile:
/usr/share/netbeans/10.0/ide/modules/org-netbeans-modules-db.jar:
java.lang.UnsupportedClassVersionError:
org/netbeans/lib/ddl/DBConnection has been compiled by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions up to 54.0
I tried to run NetBeans with OpenJDK 8 and OpenJDK 11, but I can't seem to get rid of this error. I didn't find helpful hints, just for older NetBeans versions and they don't really work.
After deactivating the corresponding module, NB starts but shows a "Unexpected Exception" in the logs:
java.lang.IllegalStateException:
Cannot call getCompilationUnit() if current phase < JavaSource.Phase.PARSED.
You must call toPhase(Phase.PARSED) first.
at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getCompilationUnit(Unknown Source)
at org.netbeans.api.java.source.CompilationInfo.getCompilationUnit(Unknown Source)
at org.netbeans.modules.java.JavaNode$IconTask$SourceIcon$1.run(Unknown Source)
at org.netbeans.modules.java.JavaNode$IconTask$SourceIcon$1.run(Unknown Source)
at org.netbeans.api.java.source.JavaSource$MultiTask.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(Unknown Source)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(Unknown Source)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(Unknown Source)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(Unknown Source)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(Unknown Source)
at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(Unknown Source)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Unknown Source)
at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(Unknown Source)
at org.netbeans.modules.parsing.api.ParserManager.parse(Unknown Source)
at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(Unknown Source)
at org.netbeans.api.java.source.JavaSource.runUserActionTask(Unknown Source)
at org.netbeans.modules.java.JavaNode$IconTask$SourceIcon.computeIcon(Unknown Source)
at org.netbeans.modules.java.JavaNode$IconTask.run(Unknown Source)
at org.openide.util.RequestProcessor$Task.run(Unknown Source)
at org.netbeans.modules.openide.util.GlobalLookup.execute(Unknown Source) [catch]
at org.openide.util.lookup.Lookups.executeWith(Unknown Source)
at org.openide.util.RequestProcessor$Processor.run(Unknown Source)
This exception is different from that one.
Most annoyingly, the Navigator does not work anymore. Both of the latter errors might be side effects of these exceptions but I am not sure. This bug has been reported for Debian.
I also tried that installation guide: I updated JAVA_HOME
in /etc/environment
to
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/java"
It works better but I still get loads of NullPointerExceptions when NetBeans parses the code.
0 Answers