<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Arquillian integration test failed after switching to zulu openJDK17</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=123348328" />
  <subtitle>Arquillian integration test failed after switching to zulu openJDK17</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=123348328</id>
  <updated>2026-04-06T10:15:11Z</updated>
  <dc:date>2026-04-06T10:15:11Z</dc:date>
  <entry>
    <title>RE: Arquillian integration test failed after switching to zulu openJDK17</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123443563" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123443563</id>
    <updated>2025-06-12T13:55:12Z</updated>
    <published>2025-06-12T13:54:52Z</published>
    <summary type="html">&lt;p&gt;Tomcat has the necessary add-opens, but that doesn't mean that
  Arquillian is necessarily doing the same.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2025-06-12T13:54:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Arquillian integration test failed after switching to zulu openJDK17</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123409142" />
    <author>
      <name>Ramalingaiah. D</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123409142</id>
    <updated>2025-05-20T11:34:48Z</updated>
    <published>2025-05-20T11:34:48Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;please download JDK  version &amp;quot;1.8.0_333&amp;quot;. &lt;/p&gt;
&lt;p&gt;it will work.&lt;/p&gt;</summary>
    <dc:creator>Ramalingaiah. D</dc:creator>
    <dc:date>2025-05-20T11:34:48Z</dc:date>
  </entry>
  <entry>
    <title>Arquillian integration test failed after switching to zulu openJDK17</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123348327" />
    <author>
      <name>旻 吴</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123348327</id>
    <updated>2025-04-15T00:45:12Z</updated>
    <published>2025-04-12T06:47:28Z</published>
    <summary type="html">&lt;p&gt;Hello, we recently updated an existing liferay workspace to using
  gralde8.5 and azul openJDK17, following the official tutorial
  (https://learn.liferay.com/ja/w/dxp/liferay-development/tooling/liferay-workspace/configuring-liferay-workspace).
  However, the arquillian integration test tasks ( gradle:
  testIntegration ) failed due to JDK17's accessible restriction.&lt;/p&gt;
&lt;p&gt;environment&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;gradle8.5&lt;/li&gt;
  &lt;li&gt;zulu-JDK17&lt;/li&gt;
  &lt;li&gt;liferay gradle plugin: 10.1.0&lt;/li&gt;
  &lt;li&gt;liferay 2024q3.7&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Problem&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;the testIntegration task failed because:&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
  &lt;pre&gt;
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field static final java.lang.invoke.MethodHandles$Lookup java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP accessible: module java.base does not &amp;quot;opens java.lang.invoke&amp;quot; to unnamed module @3155a7c7&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
  &lt;li&gt;by verifying the log we found that&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
  &lt;pre&gt;
Caused by: java.lang.ExceptionInInitializerError
	at com.liferay.petra.string.StringBundler$StringConcatenator.&amp;lt;clinit&amp;gt;(StringBundler.java:470)
	at com.liferay.petra.string.StringBundler._toStringStringConcatenator(StringBundler.java:304)&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
  &lt;li&gt;the source code says (https://github.com/liferay/liferay-portal/blob/2133193931be02e06abca82835315ed6aee23349/modules/core/petra/petra-string/src/main/java/com/liferay/petra/string/StringBundler.java#L370)&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
  &lt;p&gt;line370:    field.setAccessible(true);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thus we considered it was due to the restriction of JDK17. However,
  if we check the tomcat's setenv.sh under the
  `[workspace]/bundles/tomcat-xxxx/bin/` folder we could see that:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;JDK_JAVA_OPTIONS=&amp;quot;$JDK_JAVA_OPTIONS
    --add-opens=java.base/java.lang=ALL-UNNAMED
    --add-opens=java.base/java.lang.invoke=ALL-UNNAMED
    --add-opens=java.base/java.lang.reflect=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.net.www.protocol.https=ALL-UNNAMED
    --add-opens=java.base/sun.util.calendar=ALL-UNNAMED
    --add-opens=jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED&amp;quot;&lt;br&gt;  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Besides, the gradlew's log shown that:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;NOTE: Picked up JDK_JAVA_OPTIONS: 
    --add-opens=java.base/java.lang=ALL-UNNAMED
    --add-opens=java.base/java.lang.invoke=ALL-UNNAMED
    --add-opens=java.base/java.lang.reflect=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.net.www.protocol.https=ALL-UNNAMED
    --add-opens=java.base/sun.util.calendar=ALL-UNNAMED
    --add-opens=jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
    --add-opens=java.base/java.lang=ALL-UNNAMED
    --add-opens=java.base/java.io=ALL-UNNAMED
    --add-opens=java.base/java.util=ALL-UNNAMED
    --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thus the configuration was just the same as the recommended one at
  the Liferay's blog: (https://liferay.dev/blogs/-/blogs/jdk-17-jdk-21-solving-module-does-not-opens-to-unnamed-module). &lt;/p&gt;
&lt;p&gt;We wonder if there is anything we missed? Looking for your kind help. Thanks.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>旻 吴</dc:creator>
    <dc:date>2025-04-12T06:47:28Z</dc:date>
  </entry>
</feed>
