Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-2496

Inbound with script that produces null value cause import failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2 (Tycho)
    • Fix Version/s: 3.3 (Lincoln)
    • Component/s: Model
    • Labels:
      None

      Description

      Having the following attribute definition

               <attribute>
                  <c:ref>ri:firstname</c:ref>
                  <displayName>First name</displayName>
                  <limitations>
                     <minOccurs>0</minOccurs>
                     <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                     </access>
                  </limitations>
                  <inbound>
                     <strength>strong</strength>
                     <expression>
                        <script>
                           <allowEmptyValues>true</allowEmptyValues>
                           <code>
                              if (input?.contains('abcdef')) {
                                  return input
                              } else {
                                  return null
                              }
                           </code>
                        </script>
                     </expression>
                     <target>
                        <c:path>$user/description</c:path>
                     </target>
                  </inbound>
               </attribute>
      

      When executing import of account "u002" from resource (having firstName = "first-002"), the result is the following:

      Failed to import: java.lang.IllegalStateException: Neither value nor raw element specified in property value PPV(null) (description in user:null(u002)); in new user in LensFocusContext(UserType:null)
      
      com.evolveum.midpoint.util.exception.SystemException: java.lang.IllegalStateException: Neither value nor raw element specified in property value PPV(null) (description in user:null(u002)); in new user in LensFocusContext(UserType:null)
      at com.evolveum.midpoint.model.impl.sync.SynchronizationService.notifyChange_aroundBody0(SynchronizationService.java:260)
      at com.evolveum.midpoint.model.impl.sync.SynchronizationService$AjcClosure1.run(SynchronizationService.java:1)
      at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:178)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.processResourceObjectChangeListenerNdc(MidpointAspect.java:83)
      at com.evolveum.midpoint.model.impl.sync.SynchronizationService.notifyChange(SynchronizationService.java:151)
      at com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl.notifyChange_aroundBody0(ChangeNotificationDispatcherImpl.java:153)
      at com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl$AjcClosure1.run(ChangeNotificationDispatcherImpl.java:1)
      at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:178)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.processResourceObjectChangeListenerNdc(MidpointAspect.java:83)
      at com.evolveum.midpoint.provisioning.impl.ChangeNotificationDispatcherImpl.notifyChange(ChangeNotificationDispatcherImpl.java:135)
      at com.evolveum.midpoint.model.impl.sync.SynchronizeAccountResultHandler.handleObject(SynchronizeAccountResultHandler.java:181)
      at com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeResultHandler.processRequest(AbstractSearchIterativeResultHandler.java:274)
      at com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeResultHandler.handle(AbstractSearchIterativeResultHandler.java:146)
      at com.evolveum.midpoint.model.impl.importer.ImportAccountsFromResourceTaskHandler.importSingleShadow(ImportAccountsFromResourceTaskHandler.java:287)
      at com.evolveum.midpoint.model.impl.controller.ModelController.importFromResource_aroundBody22(ModelController.java:1890)
      at com.evolveum.midpoint.model.impl.controller.ModelController$AjcClosure23.run(ModelController.java:1)
      at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:178)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)
      at com.evolveum.midpoint.util.aspect.MidpointAspect.processModelNdc(MidpointAspect.java:63)
      at com.evolveum.midpoint.model.impl.controller.ModelController.importFromResource(ModelController.java:1876)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:435)
      at com.sun.proxy.$Proxy143.importFromResource(Unknown Source)
      at com.evolveum.midpoint.web.page.admin.resources.content.PageContentAccounts.importAccount(PageContentAccounts.java:501)
      at com.evolveum.midpoint.web.page.admin.resources.content.PageContentAccounts.access$15(PageContentAccounts.java:491)
      at com.evolveum.midpoint.web.page.admin.resources.content.PageContentAccounts$21.onClick(PageContentAccounts.java:425)
      at com.evolveum.midpoint.web.component.menu.cog.MenuLinkPanel.onClick(MenuLinkPanel.java:98)
      at com.evolveum.midpoint.web.component.menu.cog.MenuLinkPanel$2.onClick(MenuLinkPanel.java:56)
      at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:86)
      at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:124)
      at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:633)
      at sun.reflect.GeneratedMethodAccessor592.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
      at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
      at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
      at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
      at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter(MidPointProfilingServletFilter.java:78)
      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.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalStateException: Neither value nor raw element specified in property value PPV(null) (description in user:null(u002)); in new user in LensFocusContext(UserType:null)
      at com.evolveum.midpoint.model.impl.lens.LensElementContext.checkConsistence(LensElementContext.java:442)
      at com.evolveum.midpoint.model.impl.lens.LensElementContext.checkConsistence(LensElementContext.java:414)
      at com.evolveum.midpoint.model.impl.lens.LensFocusContext.checkConsistence(LensFocusContext.java:454)
      at com.evolveum.midpoint.model.impl.lens.LensElementContext.checkConsistence(LensElementContext.java:400)
      at com.evolveum.midpoint.model.impl.lens.LensContext.checkConsistence(LensContext.java:604)
      at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocusFocus(FocusProcessor.java:206)
      at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocus(FocusProcessor.java:139)
      at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:207)
      at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:105)
      at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:259)
      at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:193)
      at com.evolveum.midpoint.model.impl.sync.SynchronizationService.reactToChange(SynchronizationService.java:670)
      at com.evolveum.midpoint.model.impl.sync.SynchronizationService.notifyChange_aroundBody0(SynchronizationService.java:255)
      ... 98 more
      Caused by: java.lang.IllegalStateException: Neither value nor raw element specified in property value PPV(null) (description in user:null(u002))
      at com.evolveum.midpoint.prism.PrismPropertyValue.checkConsistenceInternal(PrismPropertyValue.java:265)
      at com.evolveum.midpoint.prism.Item.checkConsistenceInternal(Item.java:671)
      at com.evolveum.midpoint.prism.PrismContainerValue.checkConsistenceInternal(PrismContainerValue.java:1289)
      at com.evolveum.midpoint.prism.Item.checkConsistenceInternal(Item.java:671)
      at com.evolveum.midpoint.prism.PrismContainer.checkConsistenceInternal(PrismContainer.java:635)
      at com.evolveum.midpoint.prism.Item.checkConsistence(Item.java:625)
      at com.evolveum.midpoint.model.impl.lens.LensElementContext.checkConsistence(LensElementContext.java:438)
      ... 110 more
      

        Attachments

          Activity

            People

            Assignee:
            mederly Pavol Mederly
            Reporter:
            mederly Pavol Mederly
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: