Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1524

CSVFileConnector init NPE

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.19.4
    • None
    • CSV File Connector
    • None

    Description

      While testing RCS - Agent - IDM with CSV connector, I ran across this NPE:

      Feb 03, 2021 9:06:12 AM DEBUG o.i.f.api.operations.GetApiOp: Enter: getObject(ObjectClass: __ACCOUNT__, Attribute: {Name=__UID__, Value=[otOJemswRh]}, OperationOptions: {ATTRS_TO_GET:[firstname,roles,mobileTelephoneNumber,description,__NAME__,email,lastname,username],CAUD_TRANSACTION_ID:682c18e0-eda6-4196-a4e8-c47fa682f79c-7277/134639})	Method: getObject 
      Feb 03, 2021 9:06:12 AM DEBUG o.i.f.api.operations.GetApiOp: Exception: 	Method: getObject 
      java.lang.NullPointerException: null
      	at org.forgerock.openicf.csvfile.CSVFileConnector.init(CSVFileConnector.java:222)
      	at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:100)
      	at com.sun.proxy.$Proxy18.search(Unknown Source)
      	at org.identityconnectors.framework.impl.api.local.operations.GetImpl.getObject(GetImpl.java:72)
      	at jdk.internal.reflect.GeneratedMethodAccessor17.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.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
      	at com.sun.proxy.$Proxy19.getObject(Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor17.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.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:101)
      	at com.sun.proxy.$Proxy19.getObject(Unknown Source)
      	at jdk.internal.reflect.GeneratedMethodAccessor17.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.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:76)
      	at com.sun.proxy.$Proxy19.getObject(Unknown Source)
      	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.identityconnectors.framework.impl.api.local.LocalConnectorFacadeImpl$ReferenceCountingProxy.invoke(LocalConnectorFacadeImpl.java:315)
      	at com.sun.proxy.$Proxy19.getObject(Unknown Source)
      	at org.identityconnectors.framework.impl.api.AbstractConnectorFacade.getObject(AbstractConnectorFacade.java:318)
      	at org.forgerock.openicf.framework.async.impl.GetAsyncApiOpImpl$InternalLocalOperationProcessor.executeOperation(GetAsyncApiOpImpl.java:174)
      	at org.forgerock.openicf.framework.async.impl.GetAsyncApiOpImpl$InternalLocalOperationProcessor.executeOperation(GetAsyncApiOpImpl.java:1)
      	at org.forgerock.openicf.framework.async.impl.AbstractLocalOperationProcessor.execute(AbstractLocalOperationProcessor.java:34)
      	at org.forgerock.openicf.framework.remote.OpenICFServerAdapter.processOperationRequest(OpenICFServerAdapter.java:379)
      	at org.forgerock.openicf.framework.remote.OpenICFServerAdapter.processMessage(OpenICFServerAdapter.java:143)
      	at org.forgerock.openicf.framework.remote.OpenICFServerAdapter.lambda$0(OpenICFServerAdapter.java:123)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Feb 03, 2021 9:06:12 AM DEBUG o.f.o.f.remote.OpenICFServerAdapter: Client onMessage(6,475:bytes)	Method: onMessage 
      Feb 03, 2021 9:06:12 AM DEBUG o.f.o.f.remote.OpenICFServerAdapter: Client onMessage(messageId: 9011
      request {
        operationRequest {
          connectorKey {
            bundleName: "org.forgerock.openicf.connectors.csvfile-connector"
            bundleVersion: "1.5.19.5-SNAPSHOT"
            connectorName: "org.forgerock.openicf.csvfile.CSVFileConnector"
          }
          connectorFacadeKey: "AAD6+wAAAA..."
          locale {
            language: "en"
            country: "US"
          }
          getOpRequest {
            objectClass: "__ACCOUNT__"
            uid {
              value: "wdtUiormCr"
            }
            options: "\000\000\372\373\000\000\000\002\000\000\000\005\000\000\000\020OperationOptions\000\000\000\000\000\000\000\aoptions\000\000\000\001\000\000\000\003Map\000\000\000\002\000\000\000\bMapEntry\000\000\000\003\000\000\000\006String\000\000\000\004=\000\000\000\000G\000\000\000\001\000\000\001\236=\000\000\000\002F\000\000\001\035=\000\000\000\003F\000\000\000\033=\000\000\000\004F\000\000\000\020\000\000\000\fATTRS_TO_GETHF\000\000\000\362>=\000\000\000\004F\000\000\000\030=\000\000\000\004F\000\000\000\r\000\000\000\tfirstnameHF\000\000\000\024=\000\000\000\004F\000\000\000\t\000\000\000\005rolesHF\000\000\000$=\000\000\000\004F\000\000\000\031\000\000\000\025mobileTelephoneNumberHF\000\000\000\032=\000\000\000\004F\000\000\000\017\000\000\000\vdescriptionHF\000\000\000\027=\000\000\000\004F\000\000\000\f\000\000\000\b__NAME__HF\000\000\000\024=\000\000\000\004F\000\000\000\t\000\000\000\005emailHF\000\000\000\027=\000\000\000\004F\000\000\000\f\000\000\000\blastnameHF\000\000\000\027=\000\000\000\004F\000\000\000\f\000\000\000\busernameHHHF\000\000\000q=\000\000\000\003F\000\000\000\"=\000\000\000\004F\000\000\000\027\000\000\000\023CAUD_TRANSACTION_IDHF\000\000\000?=\000\000\000\004F\000\000\0004\000\000\0000682c18e0-eda6-4196-a4e8-c47fa682f79c-7277/134646HHHH"
          }
        }
        hostId: "e12e014a-f769-4104-b928-ea19ee1b3e4c"
      }
      )	Method: processMessage 
      Feb 03, 2021 9:06:12 AM DEBUG o.f.o.f.remote.OpenICFServerAdapter: IN Request(144,115,188,075,864,883:rcsPrincipal)	Method: processOperationRequest 
      

      There was also this mis-mapped error in the IDM logs. If the NPE isn't being properly wrapped by an ICF exception, then that would need to be fixed too.

      OpenIDM ready
      [343] Feb 03, 2021 9:06:12.883 AM org.forgerock.openidm.sync.LazyObjectAccessor lambda$rawReadObject$1
      WARNING: Failed to read target object
      org.forgerock.json.resource.InternalServerErrorException: 
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper$DotNetExceptionHelper$5.getMappedException(ExceptionHelper.java:191)
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptRemoteWrappedException(ExceptionHelper.java:293)
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptConnectorException(ExceptionHelper.java:147)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleRead(ObjectClassResourceProvider.java:657)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleRead(ObjectClassRequestHandler.java:142)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:331)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:104)
      	at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterRead(ResourceApiVersionRoutingFilter.java:79)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:255)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:331)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:104)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterRead$5(AuditFilter.java:151)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:177)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterRead(AuditFilter.java:151)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.lambda$filterRead$5(ResourceFilters.java:200)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.handleRequestWithLogging(ResourceFilters.java:222)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.filterRead(ResourceFilters.java:200)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.router.filter.QueryIdToQueryFilterTransformFilter.filterRead(QueryIdToQueryFilterTransformFilter.java:245)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.router.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:255)
      	at org.forgerock.json.resource.InternalConnection.readAsync(InternalConnection.java:81)
      	at org.forgerock.json.resource.AbstractAsynchronousConnection.read(AbstractAsynchronousConnection.java:90)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.read(AbstractConnectionWrapper.java:194)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.lambda$read$2(ServletConnectionFactory.java:282)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:51)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:68)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.time(ServletConnectionFactory.java:251)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.read(ServletConnectionFactory.java:282)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.read(AbstractConnectionWrapper.java:194)
      	at org.forgerock.openidm.sync.LazyObjectAccessor.lambda$rawReadObject$1(LazyObjectAccessor.java:204)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:51)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:68)
      	at org.forgerock.openidm.sync.LazyObjectAccessor.rawReadObject(LazyObjectAccessor.java:201)
      	at org.forgerock.openidm.sync.LazyObjectAccessor.getObject(LazyObjectAccessor.java:153)
      	at org.forgerock.openidm.sync.SourceRecon.recon(SourceRecon.java:83)
      	at org.forgerock.openidm.sync.ReconTask.call(ReconTask.java:53)
      	at org.forgerock.openidm.sync.ReconTask.call(ReconTask.java:22)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.identityconnectors.framework.impl.api.remote.RemoteWrappedException: 
      	at org.identityconnectors.framework.impl.api.remote.RemoteWrappedException.getCause(RemoteWrappedException.java:150)
      	at org.identityconnectors.framework.impl.api.remote.RemoteWrappedException.getCause(RemoteWrappedException.java:1)
      	... 67 more
      

      ^ it was mapped as a .Net exception, but .Net connector frameworks was NOT used. This happens in org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper#adaptRemoteWrappedException when the exception is unexpected.

      Attachments

        Issue Links

          Activity

            People

              gael Gael Allioux
              travis.haagen Travis Haagen [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: