You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing some tests with MOEA framework inside a Kevoree component, I came accross the exception below from the code of an Input port:
java.lang.IllegalArgumentException: interface org.moeaframework.util.progress.ProgressListener is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:580)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:556)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:418)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:717)
at org.apache.commons.lang3.event.EventListenerSupport.createProxy(EventListenerSupport.java:277)
at org.apache.commons.lang3.event.EventListenerSupport.initializeTransientFields(EventListenerSupport.java:268)
at org.apache.commons.lang3.event.EventListenerSupport.(EventListenerSupport.java:144)
at org.apache.commons.lang3.event.EventListenerSupport.(EventListenerSupport.java:122)
at org.apache.commons.lang3.event.EventListenerSupport.create(EventListenerSupport.java:106)
at org.moeaframework.util.progress.ProgressHelper.(ProgressHelper.java:104)
at org.moeaframework.Executor.(Executor.java:125)
at org.activehome.library.service.iems.algo.GeneticAlgo.schedule(GeneticAlgo.java:29)
at org.activehome.library.service.iems.ProactiveAdaptation.optimizeSchedule(ProactiveAdaptation.java:77)
at org.activehome.library.service.iems.ProactiveAdaptation.updateSchedule(ProactiveAdaptation.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.activehome.core.component.AbstractService.getResponse(AbstractService.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.kevoree.library.java.wrapper.port.ProvidedPortImpl.send(ProvidedPortImpl.java:93)
at org.kevoree.library.AsyncBroadcast$1.run(AsyncBroadcast.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Thanks to François I understood the ClassLoader was the wrong one. It was the one from the component who fired the message (on Output port) instead of the one from the receiver (on Input port).
We set manually the ClassLoader to work around in the Input port method:
Hello,
Doing some tests with MOEA framework inside a Kevoree component, I came accross the exception below from the code of an Input port:
java.lang.IllegalArgumentException: interface org.moeaframework.util.progress.ProgressListener is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:580)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:556)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:418)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:717)
at org.apache.commons.lang3.event.EventListenerSupport.createProxy(EventListenerSupport.java:277)
at org.apache.commons.lang3.event.EventListenerSupport.initializeTransientFields(EventListenerSupport.java:268)
at org.apache.commons.lang3.event.EventListenerSupport.(EventListenerSupport.java:144)
at org.apache.commons.lang3.event.EventListenerSupport.(EventListenerSupport.java:122)
at org.apache.commons.lang3.event.EventListenerSupport.create(EventListenerSupport.java:106)
at org.moeaframework.util.progress.ProgressHelper.(ProgressHelper.java:104)
at org.moeaframework.Executor.(Executor.java:125)
at org.activehome.library.service.iems.algo.GeneticAlgo.schedule(GeneticAlgo.java:29)
at org.activehome.library.service.iems.ProactiveAdaptation.optimizeSchedule(ProactiveAdaptation.java:77)
at org.activehome.library.service.iems.ProactiveAdaptation.updateSchedule(ProactiveAdaptation.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.activehome.core.component.AbstractService.getResponse(AbstractService.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.kevoree.library.java.wrapper.port.ProvidedPortImpl.send(ProvidedPortImpl.java:93)
at org.kevoree.library.AsyncBroadcast$1.run(AsyncBroadcast.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Thanks to François I understood the ClassLoader was the wrong one. It was the one from the component who fired the message (on Output port) instead of the one from the receiver (on Input port).
We set manually the ClassLoader to work around in the Input port method:
Thread.currentThread().setContextClassLoader(MyComponentWhoReceive.class.getClassLoader());
The text was updated successfully, but these errors were encountered: