tango-controls / JTango

TANGO kernel Java implementation. JTango moved to https://gitlab.com/tango-controls/JTango
http://tango-controls.org
8 stars 14 forks source link

NullPointerException when user not defined in TAC #46

Closed JeanLucPons closed 4 years ago

JeanLucPons commented 7 years ago

A null pointer exception is thrown when a user is not defined in the TAC.

sys/database/2.DbPutDeviceProperty -> TangoApi_READ_ONLY_MODE Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at fr.esrf.TangoApi.ConnectionDAODefaultImpl.get_host_name(ConnectionDAODefaultImpl.java:428) at fr.esrf.TangoApi.ConnectionDAODefaultImpl.throwNotAuthorizedException(ConnectionDAODefaultImpl.java:831) at fr.esrf.TangoApi.ConnectionDAODefaultImpl.command_inout(ConnectionDAODefaultImpl.java:880) at fr.esrf.TangoApi.ConnectionDAODefaultImpl.command_inout(ConnectionDAODefaultImpl.java:872) at fr.esrf.TangoApi.DatabaseDAODefaultImpl.put_device_property(DatabaseDAODefaultImpl.java:1239) at fr.esrf.TangoApi.Database.put_device_property(Database.java:944)

Pascal-Verdier commented 7 years ago

The problem is linked to the remove of ApiUtil class. The NPE is unexpected but in throwNotAuthorizedException method, the parameter this.get_host_name((Connection)null) always produce a NPE .

Ingvord commented 7 years ago

I will have a look into it

@Pascal-Verdier thanks for the investigation

Pascal-Verdier commented 4 years ago

Fixed by returning to previous release