eclipse-agail / agile-core

Source code repository for agile core components
Eclipse Public License 2.0
7 stars 16 forks source link

Instantiation exception when registering device #71

Closed dpap closed 6 years ago

dpap commented 6 years ago

Trying to register any devices results in an instantiation error

On git commit 0d03603c254d0d3009483a5c3bfe8fa8977b7670

09:54:25.796 [Thread-4] ERROR i.a.devicefactory.DeviceFactoryImp - Instantiation Exception occured agile-devicefactory | java.lang.InstantiationException: null agile-devicefactory | at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) agile-devicefactory | at java.lang.reflect.Constructor.newInstance(Constructor.java:423) agile-devicefactory | at iot.agile.devicefactory.DeviceFactoryImp.getDevice(DeviceFactoryImp.java:332) agile-devicefactory | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) agile-devicefactory | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) agile-devicefactory | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) agile-devicefactory | at java.lang.reflect.Method.invoke(Method.java:498) agile-devicefactory | at org.freedesktop.dbus.AbstractConnection$1.run(Unknown Source) agile-devicefactory | at org.freedesktop.dbus.AbstractConnection$_workerthread.run(Unknown Source)

dpap commented 6 years ago

The cause of the issue is the definition of device driver instance classes as abstract. If the abstract keyword is removed the classes are loaded without instantiation errors

cskiraly commented 6 years ago

fixed in https://github.com/Agile-IoT/agile-core/commit/5c92f56d80ae2f7e5bd8b75ebaaa997cf0fa9587