如何使用Java API重命名OIM帐户?

如何使用Java API重命名OIM帐户?,java,oim,Java,Oim,尝试此代码 Account a = findAccountIdByUID(uid); ProvisioningService provService = oimClient.getService(oracle.iam.provisioning.api.ProvisioningService.class); a = provService.getAccountDetails(Long.valueOf(a.getAccountID())); System.out.println(a.getA

尝试此代码

Account a = findAccountIdByUID(uid);    
ProvisioningService provService = oimClient.getService(oracle.iam.provisioning.api.ProvisioningService.class);
a = provService.getAccountDetails(Long.valueOf(a.getAccountID()));
System.out.println(a.getAccountData().getData().get("UD_ZZZZ_USR_LOGIN"));
a.getAccountData().getData().put("UD_ZZZZ_USR_LOGIN", "hohoho"); <<<<< error
provService.modify(a);

如何修复此问题?

很抱歉,我没有足够的声誉发表评论。
但我脑子里有东西;在放置新登录名之前,您是否尝试删除以前的登录名UD\ZZZZ\u USR\u login

很抱歉,我没有足够的声誉发表评论。
但我脑子里有东西;在放置新的登录名之前,您是否尝试删除以前的登录名值udzzzz_USR_login

请参考此链接。这可能有助于Hi@AmitJain。在本例中,我尝试重命名帐户,它是来自父窗体而不是子窗体的字段。这里唯一的选择是创建一个新的帐户实例?请参考此链接。这可能有助于Hi@AmitJain。在本例中,我尝试重命名帐户,它是来自父窗体而不是子窗体的字段。这里唯一的选择是创建一个新的帐户实例?
Exception in thread "main" oracle.iam.provisioning.exception.GenericProvisioningException: An error occurred in oracle.iam.provisioning.spi.DOBProvisioningMechanism/modify while modifying  account with account id 113 for user XELSYSADM and the cause of error is java.lang.NullPointerException.

    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)

    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)

    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)

    at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl_1036_WLStub.modifyx(Unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:602)

    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)

    at com.sun.proxy.$Proxy2.modifyx(Unknown Source)

    at oracle.iam.provisioning.api.ProvisioningServiceDelegate.modify(Unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:602)

    at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.security.Security.runAs(Security.java:41)

    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)

    at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)

    at com.sun.proxy.$Proxy3.modify(Unknown Source)

    at com.ericsson.neas.oimclient.NEASOIMClient.renameAccount(NEASOIMClient.java:354)

    at NEASOIMClientTest.main(NEASOIMClientTest.java:41)

Caused by: oracle.iam.provisioning.exception.GenericProvisioningException: An error occurred in oracle.iam.provisioning.spi.DOBProvisioningMechanism/modify while modifying  account with account id 113 for user XELSYSADM and the cause of error is java.lang.NullPointerException.

    at oracle.iam.provisioning.util.ProvisioningUtil.throwGenericProvisioningException(ProvisioningUtil.java:234)

    at oracle.iam.provisioning.spi.DOBProvisioningMechanism.modify(DOBProvisioningMechanism.java:319)

    at oracle.iam.provisioning.impl.ProvisioningServiceImpl$3.processWithoutResult(ProvisioningServiceImpl.java:528)

    at oracle.iam.platform.tx.OIMTransactionCallbackWithoutResult.process(OIMTransactionCallbackWithoutResult.java:9)

    at oracle.iam.platform.tx.OIMTransactionCallback.doInTransaction(OIMTransactionCallback.java:13)

    at oracle.iam.platform.tx.OIMTransactionCallback.doInTransaction(OIMTransactionCallback.java:6)

    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)

    at oracle.iam.platform.tx.OIMTransactionManager.oimExecute(OIMTransactionManager.java:46)

    at oracle.iam.provisioning.impl.ProvisioningServiceImpl.modify(ProvisioningServiceImpl.java:510)

    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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

    at com.sun.proxy.$Proxy506.modify(Unknown Source)

    at oracle.iam.provisioning.api.ProvisioningServiceEJB.modifyx(Unknown Source)

    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)

    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)

    at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

    at com.sun.proxy.$Proxy505.modifyx(Unknown Source)

    at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl.__WL_invoke(Unknown Source)

    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)

    at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl.modifyx(Unknown Source)

    at oracle.iam.provisioning.api.ProvisioningService_p7m7x_ProvisioningServiceRemoteImpl_WLSkel.invoke(Unknown Source)

    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)

    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)

    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)

    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)

    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)