[SRU] Netbeans fails to create a java project with NoSuchMethodError

Bug #1828427 reported by Tiago Stürmer Daitx
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netbeans (Debian)
Fix Released
Unknown
netbeans (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
When trying to create a new Java project with Netbeans 10.0 the project is not created and an error is reported on netbeans log file and in netbeans' message report. The wizard window stays there with buttons disabled and can only be dismissed with the ESC button.

This affects netbeans 10.0 packages in all supported releases: bionic, cosmic, disco, and eoan.

~/.netbeans/10.0/var/log/messages.log:
<snip>
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.openide.WizardDescriptor$Listener$2$1
java.lang.NoSuchMethodError: com.sun.tools.javadoc.main.JavadocClassFinder: method <init>(Lcom/sun/tools/javac/util/Context;)V not found
 at org.netbeans.lib.nbjavac.services.NBJavadocClassFinder.<init>(Unknown Source)
 at org.netbeans.lib.nbjavac.services.NBJavadocClassFinder$1.make(Unknown Source)
 at org.netbeans.lib.nbjavac.services.NBJavadocClassFinder$1.make(Unknown Source)
 at com.sun.tools.javac.util.Context.get(Context.java:150)
 at com.sun.tools.javac.code.ClassFinder.instance(ClassFinder.java:177)
 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:393)
 at org.netbeans.lib.nbjavac.services.NBJavaCompiler.<init>(Unknown Source)
 at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(Unknown Source)
 at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(Unknown Source)
 at com.sun.tools.javac.util.Context.get(Context.java:150)
 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:112)
 at com.sun.tools.javac.model.JavacElements.<init>(JavacElements.java:105)
 at com.sun.tools.javac.model.JavacElements.instance(JavacElements.java:99)
 at com.sun.tools.javac.api.BasicJavacTask.getElements(BasicJavacTask.java:147)
 at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(Unknown Source)
 at org.netbeans.api.java.source.CompilationController.toPhase(Unknown Source)
 at org.netbeans.modules.java.source.JavaSourceUtilImpl$1.resolveModule(Unknown Source)
 at org.netbeans.modules.java.preprocessorbridge.api.ModuleUtilities.resolveModule(Unknown Source)
 at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(Unknown Source)
 at org.netbeans.api.java.classpath.ClassPath.entries(Unknown Source)
 at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getResources(Unknown Source)
 at org.netbeans.api.java.classpath.ClassPath$SPIListener.propertyChange(Unknown Source)
 at org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(Unknown Source)
 at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
 at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
 at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
 at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.propertyChange(Unknown Source)
 at org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(Unknown Source)
 at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
 at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
 at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
 at org.netbeans.modules.java.api.common.classpath.ClassPathProviderImpl$SourceLevelSelector.propertyChange(Unknown Source)
 at org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(Unknown Source)
 at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
 at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
 at org.netbeans.spi.project.support.ant.SequentialPropertyEvaluator.stateChanged(Unknown Source)
 at org.openide.util.WeakListenerImpl$Change.stateChanged(Unknown Source)
 at org.openide.util.ChangeSupport.fireChange(Unknown Source)
 at org.openide.util.ChangeSupport.fireChange(Unknown Source)
 at org.netbeans.spi.project.support.ant.ProjectProperties$PP$2.run(Unknown Source)
 at org.netbeans.spi.project.support.ant.ProjectProperties$PP$2.run(Unknown Source)
 at org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(Unknown Source)
 at org.openide.util.Mutex.readAccess(Unknown Source)
 at org.netbeans.spi.project.support.ant.ProjectProperties$PP.fireChange(Unknown Source)
 at org.netbeans.spi.project.support.ant.ProjectProperties$PP.put(Unknown Source)
 at org.netbeans.spi.project.support.ant.ProjectProperties.putProperties(Unknown Source)
 at org.netbeans.spi.project.support.ant.AntProjectHelper$6.run(Unknown Source)
 at org.netbeans.spi.project.support.ant.AntProjectHelper$6.run(Unknown Source)
 at org.netbeans.modules.openide.util.DefaultMutexImplementation.writeAccess(Unknown Source)
 at org.openide.util.Mutex.writeAccess(Unknown Source)
 at org.netbeans.spi.project.support.ant.AntProjectHelper.putProperties(Unknown Source)
 at org.netbeans.modules.java.j2seproject.api.J2SEProjectBuilder.createProject(Unknown Source)
 at org.netbeans.modules.java.j2seproject.api.J2SEProjectBuilder.lambda$build$0(Unknown Source)
 at org.openide.filesystems.EventControl.runAtomicAction(Unknown Source)
 at org.openide.filesystems.FileSystem.runAtomicAction(Unknown Source)
 at org.netbeans.modules.java.j2seproject.api.J2SEProjectBuilder.build(Unknown Source)
 at org.netbeans.modules.java.j2seproject.J2SEProjectGenerator.createProject(Unknown Source)
 at org.netbeans.modules.java.j2seproject.ui.wizards.NewJ2SEProjectWizardIterator.instantiate(Unknown Source)
 at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(Unknown Source)
 at org.openide.loaders.TemplateWizard.handleInstantiate(Unknown Source)
 at org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(Unknown Source)
 at org.openide.loaders.TemplateWizard.instantiateNewObjects(Unknown Source)
 at org.openide.loaders.TemplateWizardIterImpl.instantiate(Unknown Source)
 at org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(Unknown Source)
 at org.openide.WizardDescriptor.callInstantiateOpen(Unknown Source)
 at org.openide.WizardDescriptor.callInstantiate(Unknown Source)
 at org.openide.WizardDescriptor.access$2300(Unknown Source)
 at org.openide.WizardDescriptor$Listener$2$1.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)

[Test Case]

 1. In Netbeans, click "File" -> "New Project"
 2. Select "Java" -> "Java Application"
 3. Click "Next >" and then "Finish"
 4. A new Java Project should have been created

Without the fix step #4 is:

 4. Observe that the Wizard will have all buttons but "Help"
    disabled and that the Notifications tab contains a
    "Unexpected Exception" message in it. The netbeans log
    file at ~/.netbeans/10.0/var/log/messages.log also
    contains an error report with the full exception.

[Regression Potential]

 * The backported patch is 1.8k lines long and touches a few APIs, so it could introduce new bugs on untested code paths. It has not yet make into Netbeans 11 or 10, so tracking upstream bugs regarding this patch could be somewhat hard. Still, it is needed to get Netbeans working.

Changed in netbeans (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netbeans - 10.0-3ubuntu2

---------------
netbeans (10.0-3ubuntu2) eoan; urgency=medium

  * Backport upstream patch to remove old javadoc api and implementation usage
    to make it work with OpenJDK 11 and later. (Closes: #925509, LP: #1828427)
  * Depend on java11-sdk instead of java8-sdk as Netbeans is now configured to
    run with openjdk-11. (LP: #1825604)

 -- Tiago Stürmer Daitx <email address hidden> Tue, 21 May 2019 20:22:04 +0000

Changed in netbeans (Ubuntu):
status: New → Fix Released
description: updated
tags: added: bionic cosmic disco
summary: - Netbeans fails to create a java project with NoSuchMethodError
+ [SRU] Netbeans fails to create a java project with NoSuchMethodError
Changed in netbeans (Ubuntu):
importance: Undecided → High
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Tiago, or anyone else affected,

Accepted netbeans into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netbeans/10.0-3ubuntu2~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in netbeans (Ubuntu Disco):
status: New → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Tiago, or anyone else affected,

Accepted netbeans into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netbeans/10.0-3ubuntu2~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in netbeans (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed-cosmic
Changed in netbeans (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Tiago, or anyone else affected,

Accepted netbeans into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netbeans/10.0-3ubuntu2~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

I have verified netbeans 10.0-3ubuntu2~18.04.1 from -proposed on 3 releases: bionic, cosmic, and disco; the fix works on all of them and I now can successfully create a java application using the Wizard.

tags: added: verification-done-bionic verification-done-cosmic verification-done-disco
removed: verification-needed verification-needed-bionic verification-needed-cosmic verification-needed-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for netbeans has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netbeans - 10.0-3ubuntu2~18.04.1

---------------
netbeans (10.0-3ubuntu2~18.04.1) bionic-security; urgency=medium

  * Backport from Eoan to bring java11-sdk dependency and javadoc fixes in.

netbeans (10.0-3ubuntu2) eoan; urgency=medium

  * Backport upstream patch to remove old javadoc api and implementation usage
    to make it work with OpenJDK 11 and later. (Closes: #925509, LP: #1828427)
  * Depend on java11-sdk instead of java8-sdk as Netbeans is now configured to
    run with openjdk-11. (LP: #1825604)

 -- Tiago Stürmer Daitx <email address hidden> Tue, 21 May 2019 20:23:51 +0000

Changed in netbeans (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Changed in netbeans (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in netbeans (Ubuntu Disco):
status: Fix Committed → Fix Released
Changed in netbeans (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.