掲示板

Get error cause programatically

7年前 に robin thakur によって更新されました。

Get error cause programatically

Regular Member 投稿: 146 参加年月日: 14/01/09 最新の投稿
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
7年前 に Kailash Yadav によって更新されました。

RE: Get error cause programatically

Regular Member 投稿: 211 参加年月日: 11/10/18 最新の投稿
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.
7年前 に robin thakur によって更新されました。

RE: Get error cause programatically

Regular Member 投稿: 146 参加年月日: 14/01/09 最新の投稿
Hi Kailash,

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