Skip to content

Java 8 not supported? #81

@olavivaino

Description

@olavivaino

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions