eclipse-plugin icon indicating copy to clipboard operation
eclipse-plugin copied to clipboard

NoSuchMethodError thrown when plugin is used with Eclipse 2022-12

Open TatuLund opened this issue 2 years ago • 3 comments

Eclipse Version: 2022-12 (4.26.0) Build id: 20221201-1913

java.lang.NoSuchMethodError: 'org.apache.maven.project.MavenProject org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest.getMavenProject()'
    at com.vaadin.integration.eclipse.maven.VaadinMavenProjectConfigurator.getSourceFolders(VaadinMavenProjectConfigurator.java:46)
    at org.eclipse.m2e.jdt.AbstractSourcesGenerationProjectConfigurator.configureRawClasspath(AbstractSourcesGenerationProjectConfigurator.java:65)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.invokeJavaProjectConfigurators(AbstractJavaProjectConfigurator.java:227)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:186)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:123)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$6(ProjectConfigurationManager.java:494)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:364)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:274)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:488)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$4(ProjectConfigurationManager.java:416)
    at java.base/java.util.Collection.removeIf(Collection.java:576)

TatuLund avatar Mar 10 '23 08:03 TatuLund

Apparently our plugin is trying to use method from Maven plugin that no longer exists. This needs to be changed.

TatuLund avatar Mar 10 '23 08:03 TatuLund

Looks to be similar type of case than this one https://github.com/vaadin/designer/issues/2443

TatuLund avatar Mar 10 '23 08:03 TatuLund

Similar problem on Eclipse 2023-03 when trying create new Vaadin 10+ design :

java.lang.NoSuchMethodError: 'org.eclipse.core.runtime.IPath[] org.eclipse.m2e.core.project.IMavenProjectFacade.getCompileSourceLocations()'
	at com.vaadin.designer2.eclipse.util.SourceFolderUtils.getSourceRootFolder(SourceFolderUtils.java:170)
	at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.getJavaSourcePath(NewFlowWizardPage.java:511)
	at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.isJavaSourcePath(NewFlowWizardPage.java:516)
	at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.initializeFields(NewFlowWizardPage.java:431)
	at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.createAdvancedControls(NewFlowWizardPage.java:354)
	at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFileCreationPage.java:240)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:744)
        ............

ndedobbeleer avatar Mar 21 '23 10:03 ndedobbeleer