facebook

JPA Facet failing to add on a Springboot 3.1.2 project

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #697465 Reply

    prem.natarajan
    Participant

    MyEclipse 2023.1.2 on MacOS
    JDK 17
    Gradle-Groovy

    Issue:
    1. Created a basic Spring starter project (3.1.2) with Spring Data JPA, Rest Repositories with MySQL driver
    2. Expecting that it will have JPA facet already added, but was not.
    3. So tried to add JPA Facet, but got this exception in the Eclipse error log and no dialog appears to configure JPA.

    eclipse.buildId=16.0.0.CI-012
    java.version=17.0.4.1
    java.vendor=Azul Systems, Inc.
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
    Framework arguments: -keyring /Users/premnatarajan/.eclipse_keyring
    Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/premnatarajan/.eclipse_keyring

    org.eclipse.ui
    Error
    Sun Jul 30 19:33:30 PDT 2023
    Unhandled event loop exception

    java.lang.ClassCastException: class org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig cannot be cast to class org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig (org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig and org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @5c27f32b)
    at com.genuitec.eclipse.springframework.SpringIDESupport.getConfigFiles(SpringIDESupport.java:158)
    at com.genuitec.eclipse.springhibernate.SpringIntegrationUtils.getConfigFiles(SpringIntegrationUtils.java:172)
    at com.genuitec.eclipse.persistence.jpa.core.MeJpaFacetInstallDataModelProvider.getValidPropertyDescriptors(MeJpaFacetInstallDataModelProvider.java:117)
    at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.getValidPropertyDescriptors(DataModelImpl.java:320)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper.setWidgetValue(DataModelSynchHelper.java:313)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper.doSynchUIWithModel(DataModelSynchHelper.java:237)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper.synchUIWithModel(DataModelSynchHelper.java:210)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper.synchComposite(DataModelSynchHelper.java:452)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper.synchCombo(DataModelSynchHelper.java:489)
    at com.genuitec.eclipse.springhibernate.facet.SpringPersistenceFacetInstallPage.createControls(SpringPersistenceFacetInstallPage.java:124)
    at com.genuitec.eclipse.j2eedt.facet.ui.MEDataModelFacetInstallFieldsPage.createTopLevelComposite(MEDataModelFacetInstallFieldsPage.java:90)
    at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage.createControl(DataModelWizardPage.java:100)
    at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.handleSelectedFacetsChangedEvent(ModifyFacetedProjectWizard.java:729)
    at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.createPageControls(ModifyFacetedProjectWizard.java:311)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:744)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:636)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1094)
    at org.eclipse.jface.window.Window.open(Window.java:788)
    at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.handleFurtherConfigHyperlinkEvent(FacetsPropertyPage.java:541)
    at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage.access$5(FacetsPropertyPage.java:499)
    at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$7.linkActivated(FacetsPropertyPage.java:484)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:215)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:309)
    at org.eclipse.ui.forms.widgets.AbstractHyperlink.lambda$3(AbstractHyperlink.java:117)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4646)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1325)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4413)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3989)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at com.genuitec.eclipse.j2eedt.facet.ui.command.ManageFacetsCommand.execute(ManageFacetsCommand.java:36)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:438)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:449)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:475)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4646)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1325)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4413)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3989)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

    #697478 Reply

    Brian Fernandes
    Moderator

    Prem,

    Thank you for the report – we’ve been able to replicate this in MyEclipse 2023 as well. We’re investigating to see if we can provide a workaround for you to continue. Apologies for the inconvenience caused.

    #697614 Reply

    prem.natarajan
    Participant

    Hi, Any workaround or fix available yet?

    #697626 Reply

    Brian Fernandes
    Moderator

    Prem,

    Just wanted to check if Groovy/Gradle is something you intended to explicitly use in this project. Maven was the default earlier, and if you choose Maven the functionality does work as expected. We’re looking at a few manual steps that you can use to add the required facets if you would really like to use Groovy. Sorry for the delay!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: JPA Facet failing to add on a Springboot 3.1.2 project

You must be logged in to post in the forum log in