3

I am having one numeric screenName 12345 which has it's emailAddress [email protected] in user_ table of liferay. When i am creating another screenname [email protected] the emailAddress field has [email protected] for the same table. So when i am trying to log in with screenname [email protected] liferay is throwing exception. Stack trace:

ERROR [JDBCExceptionReporter:101] Duplicate entry '[email protected]' for key 'IX_615E9F7A'
 ERROR [OpenSSOAutoLogin:138] com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: Could not execute JDBC batch update
com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: Could not execute JDBC batch update
    at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:91)
    at com.liferay.portal.service.persistence.UserPersistenceImpl.updateImpl(UserPersistenceImpl.java:477)
    at com.liferay.portal.service.persistence.UserPersistenceImpl.update(UserPersistenceImpl.java:441)
    at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:338)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy70.addUser(Unknown Source)
    at com.liferay.portal.service.UserLocalServiceUtil.addUser(UserLocalServiceUtil.java:149)
    at com.liferay.portal.security.auth.OpenSSOAutoLogin.addUser(OpenSSOAutoLogin.java:170)
    at com.liferay.portal.security.auth.OpenSSOAutoLogin.login(OpenSSOAutoLogin.java:126)
    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:211)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:130)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:191)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    at com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.processFilter(ThreadLocalCacheFilter.java:55)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
Caused by: com.liferay.portal.kernel.dao.orm.ORMException: Could not execute JDBC batch update
    at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:41)
    at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:122)
    at com.liferay.portal.service.persistence.BatchSessionImpl.update(BatchSessionImpl.java:75)
    at com.liferay.portal.service.persistence.BatchSessionUtil.update(BatchSessionUtil.java:53)
    at com.liferay.portal.service.persistence.UserPersistenceImpl.updateImpl(UserPersistenceImpl.java:472)
    ... 59 more

I am using Liferay 5.2.3 version. How to resolve this?

2 Answers 2

0

There is a unique index in USER_ table on EMAILADDRESS+COMPANYID column. It appears that the 2nd user is not being created during OpenSSO login because of preexisting user with same email. The easiest solution would be to change the 1st user's email (either from Liferay GUI or database) and only then try creating the 2nd user.

2
  • Thanks for your reply. But how can i remove that index as i want to have two users with the same emailAddress but different screennames?
    – Sayan
    Commented Jan 21, 2013 at 14:50
  • 3
    Here are some tips like changing the index to non-unique and checking for DuplicateUserEmailAddressException: liferay.com/community/forums/-/message_boards/message/7554177 You would be losing the ability to authenticate by email by doing this. And there may be other unexpected problems.
    – donatas
    Commented Jan 21, 2013 at 14:54
-1

Got the Solution. Dropped Index IX_615E9F7A from Liferay and it is working .....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.