i have a problem that i hope should be quite simple to solve but i just don't know how to do so myself.
I am working with eclipse 2022-3 and trying to develop with liferay 7.3.5 together with java 1.8. Recently I got a new laptop and have tried to move my old eclipse installation, together with my old workspace to my new laptop. However this has gone wrong somehow, my workspace is working correctly and I can work on my old module projects just fine. But when trying to create a new Liferay module project, I get an error:
eclipse.buildId=4.23.0.I20220308-0310
java.version=21.0.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.jface
Error
Thu Jan 04 11:53:07 CET 2024
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Map java.security.SecureClassLoader.pdcache accessible: module java.base does not "opens java.security" to unnamed module @73909fd0
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183)
at java.base/java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:131)
at org.codehaus.groovy.reflection.CachedClass$1$1.run(CachedClass.java:52)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:48)
at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:45)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:261)
at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2374)
at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2369)
at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2256)
at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3299)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3263)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:251)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:282)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:872)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:232)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:236)
at org.codehaus.groovy.ast.builder.AstStringCompiler.compile(AstStringCompiler.groovy:43)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:138)
at org.codehaus.groovy.ast.builder.AstBuilder.buildFromString(AstBuilder.groovy:100)
at org.codehaus.groovy.ast.builder.AstBuilder.buildFromString(AstBuilder.groovy)
at com.liferay.ide.gradle.core.model.GradleBuildScript.<init>(GradleBuildScript.java:64)
at com.liferay.ide.gradle.core.model.GradleBuildScript.<init>(GradleBuildScript.java:53)
at com.liferay.ide.gradle.core.model.GradleBuildScript.<init>(GradleBuildScript.java:49)
at com.liferay.ide.gradle.core.LiferayGradleWorkspaceProject.isFlexibleLiferayWorkspace(LiferayGradleWorkspaceProject.java:384)
at com.liferay.ide.project.ui.RequireLiferayWorkspaceProject.promptIfLiferayWorkspaceNotExists(RequireLiferayWorkspaceProject.java:76)
at com.liferay.ide.project.ui.modules.NewLiferayModuleProjectWizard.init(NewLiferayModuleProjectWizard.java:49)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizard(WorkbenchWizardNode.java:165)
at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:110)
at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSelectionPage.java:98)
at org.eclipse.ui.internal.dialogs.NewWizardSelectionPage.advanceToNextPageOrFinish(NewWizardSelectionPage.java:73)
at org.eclipse.ui.internal.dialogs.NewWizardNewPage.lambda$0(NewWizardNewPage.java:342)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:780)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:777)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1542)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1211)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:272)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:329)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:119)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1063)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
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:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
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:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
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)
I will only get this error on the logs if I go through new -> project -> liferay -> liferay module project. Otherwise it will simply not work and refuse to say anything.
I have tried to update my liferay plugin on eclipse and also removed it and reinstalled it. I tried adding some settings to my gradle properties file but that didn't solve it. Other than that i searched on google for a solution but couldn't really find anything
as requested this is my eclipse.ini file(i replaced my username with the word user):
-startup
plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.library
C:\Users\user\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.400.v20211117-0650
-product
org.eclipse.epp.package.jee.product
-showsplash
C:\Users\user\.p2\pool\plugins\org.eclipse.epp.package.common_4.23.0.20220310-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:/Users/user/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.1.v20231028-0937/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=11
[email protected]/eclipse-workspace
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=https://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
--add-opens=java.base/java.lang=ALL-UNNAMED
-Djava.security.manager=allow
-Dswt.enable.autoScale=true
-Dswt.autoScale=150
-Dswt.autoScale.method=nearest
I'm hoping someone had this problem before and can help me solve it?
