Error on Login - QueryMoreThanOneRecordsFound

223 views
Skip to first unread message

Satish Vijayan

unread,
Jun 21, 2017, 10:48:29 AM6/21/17
to iDempiere

When I login as System / pwd on my local instance of idemp – I get QueryMoreThanOneRecordsFound error.


Details attached herewith in the file.


Going through the forums, I found a similar error in some other module. But nothing related to logging in.


Satish Vijayan

Finance Professional, Newb, SQL (5/10), Java (0/10)

Login ErrorQueryMoreThanOneRecordsFound.docx

Joseph

unread,
Jun 22, 2017, 12:03:06 AM6/22/17
to iDempiere
I couldn’t understand
Why there were two rows with the same filter criteria (Cause)(
“Remember me” on login window will create a AD_Preference record under login user ( ie System). 
When i check and navigate those records with your sql clause , the login preference 's user_id is changed by something. 
Click Next will save null to the correct ad_user_id of preference . That 's ad_preference  window would remove the ad_user.

If ad_user_id= null (just mean all user), query will give more than one results. 
If you dont check those records , no user_id missing and all work well.
 
Why from a functional standpoint, we need to throw an exception
Remember me will save only one preference record , so two is an exception.
 
How to correct the issue – I could easily delete a row – but wanted to understand the causes.
Delete will remove the preference info created by "Remember me" , u need input password again.
update AD_Preference  set ad_user_id = createdby , it will correct issue . 
But u can't enter preference window and check those records , as ad_user_id will removed.

That's what i found , hope this can help you.

B.R.
Joseph
 


Satish Vijayan

unread,
Jul 10, 2017, 2:29:51 AM7/10/17
to iDempiere
I marked this as complete. Thanks Joseph - and sorry for the delayed reply. Completely forgot in the mad rush of things.

Joseph

unread,
Jul 3, 2018, 4:59:29 AM7/3/18
to iDempiere
After a year , i just get the answer as :

system client dont allow display the preference user in other clients. 
so the record is changed and ad_user_id to set null that lead a morethanone query result.

i create an issue and upload my patch , any review is welcome.

B.R.
Joseph

Akshara Romesh

unread,
Oct 14, 2022, 1:10:48 AM10/14/22
to iDempiere
Hi Joseph,

IT IS JUST FOR INFORMATION FOR  FUTURE TO ACHIEVE IN OTHER WAY AROUND

Just today I encountered this problem while login in from System User I tried your patch but it was still the same.
Then  I read your article carefully and that helped me to achieve the result functionally in which we just need to log in from Super User in the system client and open all those preferences which are under User/Contact = System (Select user which creates the same problem while login)
and delete all the preferences of that user.

The reason behind this is the same as your article, sometimes it creates a duplicate or null value record which start creating this problem so to fix that simply just delete all preference, and when you logged in again System will create all default preferences value automatically fresh.

Thanks
Akshara R


Reply all
Reply to author
Forward
0 new messages