java-opensdk icon indicating copy to clipboard operation
java-opensdk copied to clipboard

Java 17 Support

Open namuller30 opened this issue 2 years ago • 0 comments

Hi,

I'm trying to use the open sdk with Java 17 following the sample project and seeing the following error when the test starts locally. Is there any plan to support Java 17 here?

I found the following link which makes me think this is the root of my problem, but I'd rather not switch java versions if possible.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @1e92bd61
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
	at com.google.gson.Gson.getAdapter(Gson.java:458)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
	at com.google.gson.Gson.getAdapter(Gson.java:458)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
	at com.google.gson.Gson.getAdapter(Gson.java:458)
	at com.google.gson.Gson.toJson(Gson.java:696)
	at com.google.gson.Gson.toJson(Gson.java:683)
	at com.google.gson.Gson.toJson(Gson.java:638)
	at com.google.gson.Gson.toJson(Gson.java:618)
	at io.testproject.sdk.internal.rest.AgentClient.startSession(AgentClient.java:656)
	at io.testproject.sdk.internal.rest.AgentClient.<init>(AgentClient.java:275)
	at io.testproject.sdk.internal.rest.AgentClient.getClient(AgentClient.java:547)
	at io.testproject.sdk.drivers.web.ChromeDriver.<init>(ChromeDriver.java:757)
	at io.testproject.sdk.drivers.web.ChromeDriver.<init>(ChromeDriver.java:722)
	at io.testproject.sdk.drivers.web.ChromeDriver.<init>(ChromeDriver.java:622)
	at io.testproject.sdk.drivers.web.ChromeDriver.<init>(ChromeDriver.java:326)
	at TestProjectDemo.WebTest.main(WebTest.java:10)

Execution failed for task ':WebTest.main()'.
> Process 'command '/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

namuller30 avatar Jul 19 '22 14:07 namuller30