GoogleCloudPlatform / google-cloud-eclipse

Google Cloud Platform plugin for Eclipse
Apache License 2.0
86 stars 49 forks source link

build exceptions: Version 8.0 of jst.ear and jst.appclient do not exist #2732

Open briandealwis opened 6 years ago

briandealwis commented 6 years ago

A recent change? Seen on the Oxygen builds in a number of tests, although they seem harmless. Maybe we need to include an additional test-time dependency?

com.google.cloud.tools.eclipse.appengine.validation.ToServlet25QuickFixTest
testGetLabel(com.google.cloud.tools.eclipse.appengine.validation.ToServlet25QuickFixTest)  Time elapsed: 0 sec
testConvertServlet_sunNamespace(com.google.cloud.tools.eclipse.appengine.validation.ToServlet25QuickFixTest)  Time elapsed: 1.232 sec
testConvertServlet_jcpNamespace(com.google.cloud.tools.eclipse.appengine.validation.ToServlet25QuickFixTest)  Time elapsed: 0.121 sec
Running com.google.cloud.tools.eclipse.appengine.validation.ToServlet25SourceQuickFixTest
!ENTRY org.eclipse.jst.j2ee 4 0 2018-01-17 10:36:40.563
!MESSAGE Plugin org.eclipse.jst.jee, extension org.eclipse.jst.j2ee.J2EEModelProvider
Version 8.0 of project facet jst.ear does not exist.
!ENTRY org.eclipse.jst.j2ee 4 0 2018-01-17 10:36:40.564
!MESSAGE Version 8.0 of project facet jst.ear does not exist.
!STACK 0
java.lang.IllegalArgumentException: Version 8.0 of project facet jst.ear does not exist.
    at org.eclipse.wst.common.project.facet.core.util.internal.Versionable.getVersion(Versionable.java:80)
    at org.eclipse.wst.common.project.facet.core.internal.ProjectFacet.getVersion(ProjectFacet.java:1)
    at org.eclipse.jst.j2ee.model.J2EEModelProviderRegistry.readElement(J2EEModelProviderRegistry.java:85)
    at org.eclipse.wst.common.core.util.RegistryReader.internalReadElement(RegistryReader.java:81)
    at org.eclipse.wst.common.core.util.RegistryReader.readRegistry(RegistryReader.java:122)
    at org.eclipse.jst.j2ee.model.J2EEModelProviderRegistry.getInstance(J2EEModelProviderRegistry.java:43)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.initProviders(ModelProviderManager.java:262)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.getProviders(ModelProviderManager.java:338)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.getProvider(ModelProviderManager.java:223)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.getModelProvider(ModelProviderManager.java:93)
    at org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate.populateDefaultContent(WebFacetInstallDelegate.java:284)
    at org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate.createWeb25DeploymentDescriptor(WebFacetInstallDelegate.java:274)
    at org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate.execute(WebFacetInstallDelegate.java:128)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:324)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:339)
    at com.google.cloud.tools.eclipse.appengine.facets.FacetUtil.install(FacetUtil.java:240)
    at com.google.cloud.tools.eclipse.test.util.project.TestProjectCreator.addFacets(TestProjectCreator.java:181)
    at com.google.cloud.tools.eclipse.test.util.project.TestProjectCreator.createProject(TestProjectCreator.java:155)
    at com.google.cloud.tools.eclipse.test.util.project.TestProjectCreator.createProjectIfNecessary(TestProjectCreator.java:139)
    at com.google.cloud.tools.eclipse.test.util.project.TestProjectCreator.getProject(TestProjectCreator.java:126)
    at com.google.cloud.tools.eclipse.appengine.validation.ToServlet25SourceQuickFixTest.testConvertServlet(ToServlet25SourceQuickFixTest.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:156)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:82)
    at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:95)
    at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:35)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4577)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4186)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
    at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:120)
    at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
!ENTRY org.eclipse.jst.j2ee 4 0 2018-01-17 10:36:40.579
!MESSAGE Plugin org.eclipse.jst.jee, extension org.eclipse.jst.j2ee.J2EEModelProvider
Version 8.0 of project facet jst.appclient does not exist.
!ENTRY org.eclipse.jst.j2ee 4 0 2018-01-17 10:36:40.580
!MESSAGE Version 8.0 of project facet jst.appclient does not exist.
!STACK 0
java.lang.IllegalArgumentException: Version 8.0 of project facet jst.appclient does not exist.
    at org.eclipse.wst.common.project.facet.core.util.internal.Versionable.getVersion(Versionable.java:80)
    at org.eclipse.wst.common.project.facet.core.internal.ProjectFacet.getVersion(ProjectFacet.java:1)
    at org.eclipse.jst.j2ee.model.J2EEModelProviderRegistry.readElement(J2EEModelProviderRegistry.java:85)
    at org.eclipse.wst.common.core.util.RegistryReader.internalReadElement(RegistryReader.java:81)
    at org.eclipse.wst.common.core.util.RegistryReader.readRegistry(RegistryReader.java:122)
    at org.eclipse.jst.j2ee.model.J2EEModelProviderRegistry.getInstance(J2EEModelProviderRegistry.java:43)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.initProviders(ModelProviderManager.java:262)
    at org.eclipse.jst.j2ee.model.ModelProviderManager.getProviders(ModelProviderManager.java:338)
briandealwis commented 6 years ago

Our .appengine.validation.test pom.xml includes the org.eclipse.jst.web_ui.feature feature, which includes org.eclipse.jst.web_core.feature, which pulls in the org.eclipse.jst.j2ee bundle, which includes the project-facet definitions for jst.ear and jst.appclient.

briandealwis commented 6 years ago

This problem was introduced in Oxygen.1 and fixed in Oxygen.2. The WTP Oxygen repo (/webtools/repository/oxygen) wasn't updated to include Oxygen.2. I've emailed the wtp-dev list and hope that it should be fixed soon.

(We use the WTP Oxygen repo as they don't publish their SDK features and plugins to the Oxygen release train at /releases/oxygen for reasons unknown.)