Hello MicroEJ’s team ![]()
I’m facing an issue when launching my Kernel with a SharedService for multi-sandboxed applications.
My environment:
- my-kernel
- my-kernel-application
- vee-port RTX1170
Here is my code in Kernel side:
public static void main(String[] args) {
String kernelName = Kernel.getInstance().getName();
LOGGER.info(kernelName + " Hello World!");
Timer myTimer = new Timer();
ServiceRegistryKF serviceRegistryKF = (ServiceRegistryKF) ServiceFactory.getServiceRegistry();
serviceRegistryKF.register(Timer.class, myTimer, false);
}
Here is my code in the Application side:
public static void main(String[] args) {
Timer timer = ServiceFactory.getService(Timer.class);
if(timer != null) {
TimerTask timerTask = new TimerTask() {
@Override
public void run() {
LOGGER.info("Hello from TimerTask !");
}
};
timer.schedule(timerTask, 0, 500);
}
}
My Scenario:
- Kernel:
gradle runOnDevice - Application:
gradle buildExecutable - Copy/Paste
application.foin my microSD card - Reboot my RT1170 board
- BUG I see an error
Here is my readable error (after running gradle stackTraceReader):
java.lang.ExceptionInInitializerError: java.lang.IllegalArgumentException
at java.lang.System.getStackTrace(Unknown Source)
at java.lang.Throwable.fillInStackTrace(Throwable.java:109)
at java.lang.Throwable.<init>(Throwable.java:57)
at java.lang.Error.<init>(Error.java:26)
at java.lang.LinkageError.<init>(LinkageError.java:26)
at java.lang.ExceptionInInitializerError.<init>(ExceptionInInitializerError.java:22)
at java.lang.Thread.clinitWrapper(Thread.java:491)
at java.lang.Thread.callWrapper(Thread.java:450)
Caused by: java.lang.IllegalArgumentException
at java.lang.System.getStackTrace(Unknown Source)
at java.lang.Throwable.fillInStackTrace(Throwable.java:109)
at java.lang.Throwable.<init>(Throwable.java:38)
at ej.property.SharedPropertyFactory.getSharedPropertyRegistryInstance(SharedPropertyFactory.java:25)
at ej.property.SharedPropertyFactory.<clinit>(SharedPropertyFactory.java:16)
at java.lang.Thread.execClinit(Unknown Source)
at java.lang.Thread.clinitWrapper(Thread.java:484)
It’s look like the problem is not coming from my code because I don’t find an error on one of my file.
Could you help me ?
Thank you ![]()