Forums de discussion

Get error cause programatically

robin thakur, modifié il y a 7 années.

Get error cause programatically

Regular Member Publications: 146 Date d'inscription: 09/01/14 Publications récentes
Hi,

How do we get which column creates error while updating the user in our code. I received a error stack trace in Exception that

Caused by: java.sql.BatchUpdateException: Duplicate entry '10154-rob123screenname' for key 'IX_C5806019'

How do we get a particular value that this is the cause for failure so that i can show same to the customer.
thumbnail
Kailash Yadav, modifié il y a 7 années.

RE: Get error cause programatically

Regular Member Publications: 211 Date d'inscription: 18/10/11 Publications récentes
How are you creating users? useing out-of-box signup feature or from your custom code? The error message show that screenname is duplicate. If you are using liferay API, it validate screen name.
robin thakur, modifié il y a 7 années.

RE: Get error cause programatically

Regular Member Publications: 146 Date d'inscription: 09/01/14 Publications récentes
Hi Kailash,

I am using UserLocalServiceUtil.updateUser(user); to update user and if updation fails I am not able to find the reason.