Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liferay 2024.q2.12 doesn't start with JDK 17 #308

Open
Elinvention opened this issue Oct 8, 2024 · 1 comment
Open

Liferay 2024.q2.12 doesn't start with JDK 17 #308

Elinvention opened this issue Oct 8, 2024 · 1 comment

Comments

@Elinvention
Copy link

I have a working liferay dxp-2024.q2.12 bundle that I can start with blade CLI via blade server start.

If I start the server via this plugin, instead, I get exceptions about missing opens. I can fix this issue by adding several arguments to VM options: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED.

Now I get repeated exceptions launched by sidecar being unable to launch Elastic, again due to missing opens:

java.util.concurrent.ExecutionException: com.liferay.petra.process.ProcessException: Unable to load modified classes
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
	at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
	at com.liferay.portal.search.elasticsearch7.internal.sidecar.Sidecar$RestartFutureListener.complete(Sidecar.java:614) [bundleFile:?]
	at com.liferay.petra.concurrent.DefaultNoticeableFuture$OnceFutureListener.complete(DefaultNoticeableFuture.java:102) [com.liferay.petra.concurrent.jar:?]
	at com.liferay.petra.concurrent.DefaultNoticeableFuture.done(DefaultNoticeableFuture.java:76) [com.liferay.petra.concurrent.jar:?]
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381) [?:?]
	at java.util.concurrent.FutureTask.setException(FutureTask.java:250) [?:?]
	at com.liferay.petra.concurrent.DefaultNoticeableFuture.setException(DefaultNoticeableFuture.java:70) [com.liferay.petra.concurrent.jar:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:269) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: com.liferay.petra.process.ProcessException: Unable to load modified classes
	at com.liferay.portal.search.elasticsearch7.internal.sidecar.SidecarMainProcessCallable._loadModifiedClasses(SidecarMainProcessCallable.java:69) ~[?:?]
	at com.liferay.portal.search.elasticsearch7.internal.sidecar.SidecarMainProcessCallable.call(SidecarMainProcessCallable.java:42) ~[?:?]
	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:126) ~[com.liferay.petra.process.jar:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4f8e5cde
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
	at java.lang.reflect.Method.checkCanSetAccessible(Method.java:200) ~[?:?]
	at java.lang.reflect.Method.setAccessible(Method.java:194) ~[?:?]
	at com.liferay.petra.reflect.ReflectionUtil.getDeclaredMethod(ReflectionUtil.java:48) ~[com.liferay.petra.reflect.jar:?]
	at com.liferay.portal.search.elasticsearch7.internal.sidecar.SidecarMainProcessCallable._loadModifiedClasses(SidecarMainProcessCallable.java:54) ~[?:?]
	at com.liferay.portal.search.elasticsearch7.internal.sidecar.SidecarMainProcessCallable.call(SidecarMainProcessCallable.java:42) ~[?:?]
	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:126) ~[com.liferay.petra.process.jar:?]

For some reason those arguments are not passed down to elastic, hence it can't start.

@drewbrokke
Copy link
Member

@Elinvention we recently released a new version of the plugin here. Would you be willing to check whether this update resolves your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants