You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2022/10/31 10:44:52 UTC
[syncope] 03/03: [SYNCOPE-1707] Making Console and Enduser work fine with JDK 17
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 5d0066749e291eea1f265599e5d634d7d9193a51
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon Oct 31 11:44:35 2022 +0100
[SYNCOPE-1707] Making Console and Enduser work fine with JDK 17
---
archetype/src/main/resources/archetype-resources/fit/pom.xml | 2 +-
client/idrepo/common-ui/pom.xml | 5 +++++
client/idrepo/console/pom.xml | 12 +++++++++++-
client/idrepo/enduser/pom.xml | 10 ++++++++++
docker/console/src/main/resources/startup.sh | 2 +-
docker/enduser/src/main/resources/startup.sh | 2 +-
fit/build-tools/pom.xml | 8 +++-----
fit/console-reference/pom.xml | 9 ++++++---
fit/core-reference/pom.xml | 2 ++
fit/enduser-reference/pom.xml | 9 ++++++---
fit/wa-reference/pom.xml | 9 ++++++---
pom.xml | 10 +++++++++-
standalone/src/main/resources/setenv.bat | 2 +-
standalone/src/main/resources/setenv.sh | 2 +-
14 files changed, 63 insertions(+), 21 deletions(-)
diff --git a/archetype/src/main/resources/archetype-resources/fit/pom.xml b/archetype/src/main/resources/archetype-resources/fit/pom.xml
index b88cdeef5f..ce7edc67e3 100644
--- a/archetype/src/main/resources/archetype-resources/fit/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/fit/pom.xml
@@ -246,7 +246,7 @@ under the License.
<properties>
<cargo.jvmargs>
-Dspring.profiles.active=${spring.profiles.active}
- -XX:+CMSClassUnloadingEnabled -Xmx1024m -Xms512m</cargo.jvmargs>
+ -Xmx1024m -Xms512m</cargo.jvmargs>
<cargo.servlet.port>9443</cargo.servlet.port>
<cargo.protocol>https</cargo.protocol>
diff --git a/client/idrepo/common-ui/pom.xml b/client/idrepo/common-ui/pom.xml
index c23170019f..be0388e8fc 100644
--- a/client/idrepo/common-ui/pom.xml
+++ b/client/idrepo/common-ui/pom.xml
@@ -95,6 +95,11 @@ under the License.
<artifactId>wicket-bootstrap-extensions</artifactId>
</dependency>
+ <dependency>
+ <groupId>net.bytebuddy</groupId>
+ <artifactId>byte-buddy</artifactId>
+ </dependency>
+
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
diff --git a/client/idrepo/console/pom.xml b/client/idrepo/console/pom.xml
index 5f7b353ab0..9654b7f1b9 100644
--- a/client/idrepo/console/pom.xml
+++ b/client/idrepo/console/pom.xml
@@ -194,8 +194,18 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <wicket.ioc.useByteBuddy>true</wicket.ioc.useByteBuddy>
+ </systemProperties>
+ </configuration>
+ </plugin>
</plugins>
-
+
<resources>
<resource>
<directory>src/main/resources</directory>
diff --git a/client/idrepo/enduser/pom.xml b/client/idrepo/enduser/pom.xml
index f6b10ebe22..005d2e507f 100644
--- a/client/idrepo/enduser/pom.xml
+++ b/client/idrepo/enduser/pom.xml
@@ -182,6 +182,16 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <wicket.ioc.useByteBuddy>true</wicket.ioc.useByteBuddy>
+ </systemProperties>
+ </configuration>
+ </plugin>
</plugins>
<resources>
diff --git a/docker/console/src/main/resources/startup.sh b/docker/console/src/main/resources/startup.sh
index b12192ce2a..8b84e05637 100755
--- a/docker/console/src/main/resources/startup.sh
+++ b/docker/console/src/main/resources/startup.sh
@@ -17,5 +17,5 @@
# specific language governing permissions and limitations
# under the License.
-java -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
+java -Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
-XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope-console.war
diff --git a/docker/enduser/src/main/resources/startup.sh b/docker/enduser/src/main/resources/startup.sh
index 42656c68c9..371901cdde 100755
--- a/docker/enduser/src/main/resources/startup.sh
+++ b/docker/enduser/src/main/resources/startup.sh
@@ -17,5 +17,5 @@
# specific language governing permissions and limitations
# under the License.
-java -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
+java -Dfile.encoding=UTF-8 -Dwicket.ioc.useByteBuddy=true -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \
-XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom -jar /opt/syncope/lib/syncope-enduser.war
diff --git a/fit/build-tools/pom.xml b/fit/build-tools/pom.xml
index c0cad46e96..29182d5eec 100644
--- a/fit/build-tools/pom.xml
+++ b/fit/build-tools/pom.xml
@@ -351,8 +351,7 @@ under the License.
</container>
<configuration>
<properties>
- <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
+ <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</cargo.jvmargs>
</properties>
</configuration>
</configuration>
@@ -402,8 +401,7 @@ under the License.
<configuration>
<properties>
<cargo.glassfish.removeDefaultDatasource>false</cargo.glassfish.removeDefaultDatasource>
- <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
+ <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</cargo.jvmargs>
</properties>
</configuration>
<skip>${skipTests}</skip>
@@ -438,7 +436,7 @@ under the License.
</container>
<configuration>
<properties>
- <cargo.jvmargs>-Xdebug -XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
+ <cargo.jvmargs>-Xdebug</cargo.jvmargs>
</properties>
</configuration>
</configuration>
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index c6bed1cdd8..0f6ff63080 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -127,7 +127,8 @@ under the License.
<properties>
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
- -XX:+CMSClassUnloadingEnabled -Xmx1024m -Xms512m</cargo.jvmargs>
+ -Dwicket.ioc.useByteBuddy=true
+ -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
<deployables>
@@ -206,8 +207,9 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -XX:+CMSClassUnloadingEnabled -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
@@ -275,9 +277,10 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-javaagent:${java.home}/lib/hotswap/hotswap-agent.jar=autoHotswap=true,disablePlugin=Spring,disablePlugin=Hibernate,disablePlugin=CxfJAXRS
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 336c390c2d..126d829a4a 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -245,6 +245,7 @@ under the License.
<systemPropertyVariables>
<jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
<obscureSecretKey>${obscureSecretKey}</obscureSecretKey>
+ <wicket.ioc.useByteBuddy>true</wicket.ioc.useByteBuddy>
</systemPropertyVariables>
</configuration>
</plugin>
@@ -256,6 +257,7 @@ under the License.
<systemPropertyVariables>
<jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
<obscureSecretKey>${obscureSecretKey}</obscureSecretKey>
+ <wicket.ioc.useByteBuddy>true</wicket.ioc.useByteBuddy>
</systemPropertyVariables>
</configuration>
<executions>
diff --git a/fit/enduser-reference/pom.xml b/fit/enduser-reference/pom.xml
index 788da51f13..36179a2df6 100644
--- a/fit/enduser-reference/pom.xml
+++ b/fit/enduser-reference/pom.xml
@@ -122,7 +122,8 @@ under the License.
<properties>
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
- -XX:+CMSClassUnloadingEnabled -Xmx1024m -Xms512m</cargo.jvmargs>
+ -Dwicket.ioc.useByteBuddy=true
+ -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
<deployables>
@@ -207,8 +208,9 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -XX:+CMSClassUnloadingEnabled -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
@@ -279,9 +281,10 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-javaagent:${java.home}/lib/hotswap/hotswap-agent.jar=autoHotswap=true,disablePlugin=Spring,disablePlugin=Hibernate,disablePlugin=CxfJAXRS
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
diff --git a/fit/wa-reference/pom.xml b/fit/wa-reference/pom.xml
index efbf265ab9..516b3f02fd 100644
--- a/fit/wa-reference/pom.xml
+++ b/fit/wa-reference/pom.xml
@@ -172,7 +172,8 @@ under the License.
<properties>
<cargo.jvmargs>
-Dspring.profiles.active=embedded,https,all
- -XX:+CMSClassUnloadingEnabled -Xmx1024m -Xms512m</cargo.jvmargs>
+ -Dwicket.ioc.useByteBuddy=true
+ -Xmx1024m -Xms512m</cargo.jvmargs>
<cargo.servlet.port>9443</cargo.servlet.port>
<cargo.protocol>https</cargo.protocol>
@@ -336,8 +337,9 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,https,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -XX:+CMSClassUnloadingEnabled -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseG1GC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
@@ -392,9 +394,10 @@ under the License.
<cargo.jvmargs>
-Dspring.profiles.active=embedded,all
-Dwicket.core.settings.general.configuration-type=development
+ -Dwicket.ioc.useByteBuddy=true
-javaagent:${java.home}/lib/hotswap/hotswap-agent.jar=autoHotswap=true,disablePlugin=Spring,disablePlugin=Hibernate,disablePlugin=CxfJAXRS
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
+ -XX:+UseConcMarkSweepGC -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
diff --git a/pom.xml b/pom.xml
index 1fd3583478..8d794ce417 100644
--- a/pom.xml
+++ b/pom.xml
@@ -991,6 +991,14 @@ under the License.
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -1861,7 +1869,7 @@ under the License.
<cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port>
<cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port>
- <cargo.jvmargs>-XX:+CMSClassUnloadingEnabled -Xmx1024m -Xms512m</cargo.jvmargs>
+ <cargo.jvmargs>-Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
diff --git a/standalone/src/main/resources/setenv.bat b/standalone/src/main/resources/setenv.bat
index 035c2a4f1f..6610ba3371 100644
--- a/standalone/src/main/resources/setenv.bat
+++ b/standalone/src/main/resources/setenv.bat
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set JAVA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dspring.profiles.active=embedded -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -DCATALINA_HOME=%CATALINA_HOME%
+set JAVA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dspring.profiles.active=embedded -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Dwicket.ioc.useByteBuddy=true -DCATALINA_HOME=%CATALINA_HOME%
diff --git a/standalone/src/main/resources/setenv.sh b/standalone/src/main/resources/setenv.sh
index 7756a66623..04ce11ce63 100755
--- a/standalone/src/main/resources/setenv.sh
+++ b/standalone/src/main/resources/setenv.sh
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dspring.profiles.active=embedded -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -DCATALINA_HOME=$CATALINA_HOME"
+JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dspring.profiles.active=embedded -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+DisableExplicitGC -Dwicket.ioc.useByteBuddy=true -DCATALINA_HOME=$CATALINA_HOME"