ShibbolethLoginHandler: 500 Error when login the first time

Steps to reproduce

Steps to reproduce:
1. Configure Shibboleth authentication support using Matterhorn's ShibbolethRequestHeaderAuthenticationFilter
2. Login as a Shibboleth user the first time

Actual Results:

The error message below will be displayed in the frontend. In the log file 'opencast.log' I can see that the method 'newUserLogin' of the Implementation-Class of the interface 'ShibbolethLoginHandler' will be called multiple times.

HTTP ERROR 500

Problem accessing /engage/ui/index.html. Reason:

User '...' already exists

Caused by:

java.lang.IllegalStateException: User '154FC5459358D89A' already exists
at org.opencastproject.userdirectory.JpaUserReferenceProvider.addUserReference(JpaUserReferenceProvider.java:240)
at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:573)
at org.opencastproject.userdirectory.JpaUserReferenceProvider$$EnhancerByCGLIB$$1e485191.addUserReference(<generated>)
at org.opencastproject.security.shibboleth.test.ShibbolethLoginHandlerTest.newUserLogin(ShibbolethLoginHandlerTest.java:106)

Expected Results:
no error message.
(The method 'existingUserLogin' should be called)

Workaround (if any):
no workaround. But it seems to be a caching issue. If you wait for an unspecific time (1 minute?) then the issue gone away. (in the logs i can see that the "existingUserLogin"-method was then correctly called)

Activity

Show:
Tobias Wunden
April 7, 2015, 3:32 PM

Hi Don, your pull request (https://bitbucket.org/opencast-community/matterhorn/pull-request/415) is still open, so I am going to reopen this ticket and move it to the "In Revew" status.

Lukas Rohner
April 7, 2015, 3:57 PM

It's my pull request by the way.

Former user
April 14, 2015, 5:31 PM

Merged Lukas' pulls to r/2.x and r/1.6.x

Former user
April 14, 2015, 5:39 PM

pulls are merged

Assignee

Lukas Rohner

Reporter

DonC

Severity

Non Functioning

Tags (folksonomy)

Components

Fix versions

Affects versions

Priority

Major
Configure