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

Java 8 not supported? #81

Open
olavivaino opened this issue Nov 30, 2023 · 1 comment
Open

Java 8 not supported? #81

olavivaino opened this issue Nov 30, 2023 · 1 comment

Comments

@olavivaino
Copy link

While using smartid client in java 8 application JRE throws error:
Caused by: java.lang.UnsupportedClassVersionError: com/sun/istack/FinalArrayList has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [com.sun.istack.FinalArrayList])

This dependency is from jaxb.runtime 4.0 and if I understood correctly its java 11+ only.

I got application running with following gradle dependency setup:
implementation('ee.sk.smartid:smart-id-java-client:2.3') {
exclude group: 'org.glassfish.jaxb', module: 'jaxb-runtime'
}
implementation('org.glassfish.jaxb:jaxb-runtime:3.0.2')
implementation('jakarta.activation:jakarta.activation-api:2.1.0')
implementation('org.eclipse.angus:angus-activation:1.0.0')

however now runtime error is thrown:
java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
at jakarta.ws.rs.client.FactoryFinder.find(FactoryFinder.java:168) ~[jakarta.ws.rs-api-3.0.0.jar:3.0.0]
at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:62) ~[jakarta.ws.rs-api-3.0.0.jar:3.0.0]
at ee.sk.smartid.rest.SmartIdRestConnector.prepareClient(SmartIdRestConnector.java:180) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.rest.SmartIdRestConnector.postRequest(SmartIdRestConnector.java:258) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.rest.SmartIdRestConnector.postAuthenticationRequest(SmartIdRestConnector.java:233) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.rest.SmartIdRestConnector.authenticate(SmartIdRestConnector.java:168) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.AuthenticationRequestBuilder.getAuthenticationResponse(AuthenticationRequestBuilder.java:360) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.AuthenticationRequestBuilder.initiateAuthentication(AuthenticationRequestBuilder.java:298) ~[smart-id-java-client-2.3.jar:2.3]
at ee.sk.smartid.AuthenticationRequestBuilder.authenticate(AuthenticationRequestBuilder.java:282) ~[smart-id-java-client-2.3.jar:2.3]

I could not figure out what provider jar is still missing.

But is smartid java client still java 8 compatible?

@olavivaino
Copy link
Author

I managed to resolve error "java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found" - missing dependency
org.glassfish.jersey.connectors
jersey-apache-connector

This includes it as test dependency but its also required on runtime. This also needs to be fixed.

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

1 participant