Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-12943

Samples: ScriptedSQL - update email on user throws NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: _Samples
    • Environment:
      OpenIDM 7.0.0-SNAPSHOT (506155c) with scripted-sql-with-mysql sample
      ScriptedSQLConnector 1.5.2.0-SNAPSHOT (17b42f872bf)
    • Verified Version/s:

      Description

      Update email attribute on user (patch, rest update or recon update) throws NPE

      Sample used: *scripted-sql-with-mysql*

      To reproduce with patch

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "Content-Type: application/json" --data '[{"operation":"replace","field":"/email","value":"foo@bar.foo"}]' --request PATCH "http://localhost:8080/openidm/system/hrdb/account/7"
      
      Response Content:
      {"_id":"7","uid":"B_1548158228","fullName":"","cars":[],"organization":"1548158228","email":"foo@bar.com","lastName":"1548158228","firstName":"1548158228"}
      

      OpenIDM logs

      [110] led 22, 2019 12:57:01.465 ODP. org.forgerock.api.transform.OpenApiTransformer buildProperties
      INFO: Json schema error: string
      null
      java.lang.NullPointerException
      	at org.forgerock.api.transform.OpenApiTransformer.buildProperties(OpenApiTransformer.java:1441)
      	at org.forgerock.api.transform.OpenApiTransformer.toLocalizableProperty(OpenApiTransformer.java:1565)
      	at org.forgerock.api.transform.OpenApiTransformer.buildProperty(OpenApiTransformer.java:1497)
      	at org.forgerock.api.transform.OpenApiTransformer.buildItemsProperty(OpenApiTransformer.java:1695)
      	at org.forgerock.api.transform.OpenApiTransformer.toLocalizableProperty(OpenApiTransformer.java:1576)
      	at org.forgerock.api.transform.OpenApiTransformer.buildProperty(OpenApiTransformer.java:1497)
      	at org.forgerock.api.transform.OpenApiTransformer.buildProperties(OpenApiTransformer.java:1437)
      	at org.forgerock.api.transform.OpenApiTransformer.buildObjectModel(OpenApiTransformer.java:1352)
      	at org.forgerock.api.transform.OpenApiTransformer.buildModel(OpenApiTransformer.java:1298)
      	at org.forgerock.api.transform.OpenApiTransformer.applyOperationRequestPayload(OpenApiTransformer.java:1032)
      	at org.forgerock.api.transform.OpenApiTransformer.buildOperation(OpenApiTransformer.java:876)
      	at org.forgerock.api.transform.OpenApiTransformer.buildCreate(OpenApiTransformer.java:504)
      	at org.forgerock.api.transform.OpenApiTransformer.buildResourcePaths(OpenApiTransformer.java:392)
      	at org.forgerock.api.transform.OpenApiTransformer.buildPaths(OpenApiTransformer.java:324)
      	at org.forgerock.api.transform.OpenApiTransformer.doExecute(OpenApiTransformer.java:246)
      	at org.forgerock.api.transform.OpenApiTransformer.execute(OpenApiTransformer.java:236)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandlerApiDescription.build(ObjectClassRequestHandlerApiDescription.java:108)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.<init>(ObjectClassRequestHandler.java:51)
      	at org.forgerock.openidm.provisioner.openicf.impl.OpenICFProvisionerService.lambda$activate$0(OpenICFProvisionerService.java:301)
      	at org.forgerock.util.promise.PromiseImpl.lambda$thenOnResult$1(PromiseImpl.java:292)
      	at org.forgerock.util.promise.PromiseImpl.lambda$then$6(PromiseImpl.java:374)
      	at org.forgerock.util.promise.PromiseImpl.handleCompletion(PromiseImpl.java:536)
      	at org.forgerock.util.promise.PromiseImpl.addOrFireListener(PromiseImpl.java:524)
      	at org.forgerock.util.promise.PromiseImpl.then(PromiseImpl.java:370)
      	at org.forgerock.util.promise.PromiseImpl.then(PromiseImpl.java:361)
      	at org.forgerock.util.promise.PromiseImpl.then(PromiseImpl.java:343)
      	at org.forgerock.util.promise.PromiseImpl.thenOnResult(PromiseImpl.java:290)
      	at org.forgerock.openidm.provisioner.openicf.impl.OpenICFProvisionerService.activate(OpenICFProvisionerService.java:240)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
      	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
      	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:341)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:983)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:956)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:901)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
      	at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
      	at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
      	at org.apache.felix.framework.Felix.getService(Felix.java:3950)
      	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:73)
      	at org.apache.felix.scr.impl.inject.BindParameters.getServiceObject(BindParameters.java:47)
      	at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:664)
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2308)
      	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1805)
      	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:436)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:302)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4827)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3800)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4827)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3800)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:335)
      	at org.forgerock.openidm.router.RouterService.registerRouteService(RouterService.java:250)
      	at org.forgerock.openidm.router.RouterService.bindRequestHandler(RouterService.java:141)
      	at jdk.internal.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
      	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42)
      	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813)
      	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:436)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:302)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4827)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3800)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432)
      	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:440)
      	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:317)
      	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:119)
      	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1704)
      	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1646)
      	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
      	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gael Gael Allioux
                Reporter:
                michal.orlik@profiq.cz Michal Orlik
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: