Hello, i’m having an issue with the launch of the Registration Client. the weird thing is that it never happened before, last time i launched it a couple of weeks ago it was fine.
during the initialization process i get this error
Creating application context…
Failed to read candidate component class: URL [jar:file:/C:/Users/ricca/.m2/repository/io/mosip/commons/commons-packet-manager/1.2.0.1/commons-packet-manager-1.2.0.1.jar!/io/mosip/commons/packet/facade/PacketReader.class]; nested exception is java.lang.UnsupportedClassVersionError: org/springframework/security/access/prepost/PreAuthorize has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
The weird thing is that the commons-packet-manager-1.2.0.1.jar manifest files says that it was compiled with java 11, also the dependency from which the org/springframework/security/access/prepost/PreAuthorize file is taken says it was compiled with java 8, so no java 17 anywhere
the java runtime is
openjdk 11.0.22 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)
the code is taken from the last commit on the branch release-1.2.0.x (commit id e18ef0f4c633b783730d23019edee7f82b281662)
i’ve being trying everything but i can’t get rid of this issue, any help will be greatly appreciated
thanks a lot
Riccardo
1 Like
Dear @Riccardo_Pozzati ,
Welcome to the community and thank you for reaching out, We are looking into your query and one of our experts will respond here.
Best Regards
Team MOSIP
Hi @Riccardo_Pozzati ,
Our tech expert @khuddus_shariff is looking into the issue
Meanwhile can you please share the run time dependency tree along with runtime jars ?
Please use following command to list the dependency tree:
command: mvn dependency:tree
Hello, thanks a lot for the support.
i have the output of the mvn dependency:tree command, although the output is too large to be pasted here. i’ll share it in an external pastebin, i hope it’s ok
Hi. Can you please specify which are all Runtime Dependencies you are adding and it versions.
Do you mean the pom.xml files?
Run time dependencies like kernel-auth-adaptor , etc. which will be added to the class path while running the application locally.
Hi @Riccardo_Pozzati ,
Can you please share the output of below command
mvn -version
With Java 11 we do not face this build issue. The above command output will help us understand the problem better.
@Anusha_sunkadh
this is the output of mvn --version, although i’m using the bundled maven executable in intellij IDE
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: C:\Users\ricca\AppData\Local\Programs\IntelliJ IDEA Ultimate\plugins\maven\lib\maven3
Java version: 11.0.22, vendor: Amazon.com Inc., runtime: C:\Program Files\Amazon Corretto\jdk11.0.22_7
Default locale: it_IT, platform encoding: UTF-8
OS name: “windows 11”, version: “10.0”, arch: “amd64”, family: “windows”
also please note that i’m not experiencing the issue in the build phase, but in the context creation during the client startup
can you guide me on how to find the list of the runtime dependencies in the registratio client project?