Hi there,
I would like to write a SpringBoot3 application to control a device. I have properly registered and set up my device that I want to control in the Tuya cloud, and everything is working so far.
I have now checked out the tuya-sdk, the tuya-connector and the connector project from Github and integrated them into my project, so far so good. Everything is compilable, everything is wonderful.
I have also written a JUnit test to log in with my credentials, which was successful.
However, I now have a problem accessing my device.
I have executed all the instructions in the readme file of the tuya-connector project. But I still get this error (see below)
Can someone explain to me what else I might have to do to successfully run my test and finally get access to my device?
I work with SpringToolSuite 4.21, use Lombok version 1.18.30, Java version 17.
Somehow I have the suspicion that the two specified "add-opens"
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
from the readme file are not effective (I have specified them in the springtoolsuite.ini). Do I have to specify these two things somewhere else?
11:15:35.560 DEBUG [main] c.t.c.api.core.delegate.DelegateFactory.forRetrofit 28 : Finish create retrofit delegate for connector[de.stefan.tuya.connector.ITuyaDeviceConnector] costs : 327 ms
11:15:35.567 ERROR [main] c.t.c.a.error.ErrorProcessorInterceptor.intercept 48 : Error invoke connector[de.stefan.tuya.connector.ITuyaDeviceConnector.getById(java.lang.String), args: (bfcv54cd4b4a6712sef6qm)]
11:15:35.573 WARN [main] c.t.c.api.context.ContextInterceptor.intercept 32 : content intercept error: Error create retrofit delegate for connector : de.stefan.tuya.connector.ITuyaDeviceConnector.
Cause: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @2145433b