Java error in getDeviceData