Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22020

UserInvitationComponent relies on schema defined in addon nuxeo-platform-user-registration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 8.10-HF19, 9.3
    • Component/s: User Registration

      Description

      When creating a user without setting the password, the service UserInvitationComponent tries to fetch properties from a schema that is only defined in the addon nuxeo-platform-user-registration. So, the invitation fails.

      It's fixed when the addon is installed but the feature is different and we should have the schema in nuxeo-invite instead.

      Stacktrace with the WebUI

      ****** chain ******
      Name: User.Invite
      Exception: OperationException
      Caught error: Failed to invoke operation User.Invite
      Caused by: org.nuxeo.ecm.core.api.model.PropertyNotFoundException: No such schema, docinfo:documentId
      ****** Hierarchy calls ******
              org.nuxeo.ecm.automation.core.operations.services.UserInvite
      
              at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:234)
              at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:117)
              at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
              at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
              ... 113 more
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation User.Invite
              at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:189)
              at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
              at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
              at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:210)
              ... 116 more
      Caused by: org.nuxeo.ecm.core.api.model.PropertyNotFoundException: No such schema, docinfo:documentId
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1381)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPropertyValue(DocumentModelImpl.java:1446)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent$RegistrationApprover.run(UserInvitationComponent.java:284)
              at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:131)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.acceptRegistrationRequest(UserInvitationComponent.java:636)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.submitRegistrationRequest(UserInvitationComponent.java:617)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.submitRegistrationRequest(UserInvitationComponent.java:550)
              at org.nuxeo.ecm.automation.core.operations.services.UserInvite.run(UserInvite.java:81)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      

      Stacktrace with the JSF UI

      2017-03-30 20:34:40,249 ERROR [http-bio-0.0.0.0-8080-exec-7] [org.nuxeo.ecm.webapp.security.UserManagementActions] No such schema, docinfo:documentId
      org.nuxeo.ecm.core.api.model.PropertyNotFoundException: No such schema, docinfo:documentId
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1381)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPropertyValue(DocumentModelImpl.java:1446)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent$RegistrationApprover.run(UserInvitationComponent.java:284)
              at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:131)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.acceptRegistrationRequest(UserInvitationComponent.java:636)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.submitRegistrationRequest(UserInvitationComponent.java:617)
              at org.nuxeo.ecm.user.invite.UserInvitationComponent.submitRegistrationRequest(UserInvitationComponent.java:550)
              at org.nuxeo.ecm.webapp.security.UserManagementActions.createUser(UserManagementActions.java:242)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.nuxeo.ecm.platform.ui.web.util.NuxeoExceptionInterceptor.aroundInvoke(NuxeoExceptionInterceptor.java:80)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196)
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114)
              at org.nuxeo.ecm.webapp.security.UserManagementActions_$$_javassist_seam_20.createUser(UserManagementActions_$$_javassist_seam_20.java)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
              at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280)
              at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
              at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
              at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
              at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
              at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
              at javax.faces.component.UICommand.broadcast(UICommand.java:315)
              at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
              at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
              at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h