User registeration from other application on the same database

john taa8 years ago

Hi,
I am using traccar in conjunction with another application using the same database, the login and registration is mandated to the other application, when a new user registered in the database, he can also login through traccar web application. but the problem is when the user try to login after registration, traccar respond an error saying "nullpointerexception (PermissionManager:234 < *389 <SessionResource:103 <..)" and cannot login.
This issue will disappear only if I restart traccar server, and the user can login into traccar web normally. this issue happened to each user registering from the other application, but not if the registration was from traccar web interface .
can any one help ??

Anton Tananaev8 years ago

If you want to register user in Traccar you need to use API.

john taa8 years ago

User is registered with all required and right fields, hashedpassword,salt,name and email, so why traccar refused to fetch the user unless I restart the server ?

Anton Tananaev8 years ago

Because it's cached inside Traccar.

john taa8 years ago

Yeh, I see , so how to clear cache using api or any other code?

Anton Tananaev8 years ago

There is no API to clear the cache. You should use API to register user.

john taa8 years ago

Ok, how long the cache will remain valid ? if traccar not restarted .

Anton Tananaev8 years ago

What would make it invalid?

john taa8 years ago

if session deleted I think will do that , So I have to delete the session directly after registration !!

Anton Tananaev8 years ago

What session? How would it make cache invalid?

I believe I explained what you need to do. I'm not sure what we are discussing at this point.

john taa8 years ago

Never mind , Thank you Anton , Great Support really . :)