gpt4 book ai didi

java - OIM 中的实体管理器

转载 作者:行者123 更新时间:2023-12-02 11:05:53 26 4
gpt4 key购买 nike

我正在 OIM 中使用 EntityManager API 来更新属性。下面是代码。但我在“entMgr.modifyEntity(“User”,userLogin,mapAttrs);”处遇到异常。这是因为使用用户登录吗?我在运行时从适配器获取用户登录,它是字符串。有人可以帮我解决这个问题吗?

代码:

  HashMap<String, Object> mapAttrs = new HashMap<String, Object>();         
mapAttrs.put("Street", response);

EntityManager entMgr = Platform.getService(EntityManager.class);
logger.info("EntityManager is intialized"+ entMgr);
logger.info("User Login::"+userLogin);
try {
logger.info("Entered into try");
entMgr.modifyEntity("User",userLogin, mapAttrs);
logger.info("Attribute Updation is succesfull");
response="SUCCESS";
logger.info("Response::"+ response);
return response;
} catch (InvalidDataTypeException e) {
logger.info("InvalidDataTypeException has been encountered");

e.printStackTrace();
response="FAILURE";
return response;
} catch (InvalidDataFormatException e) {
// TODO Auto-generated catch block
logger.info("InvalidDataFormatException has been encountered");
e.printStackTrace();
response="FAILURE";
return response;
} catch (NoSuchEntityException e) {
logger.info("NoSuchEntityException has been encountered");
// TODO Auto-generated catch block
e.printStackTrace();
response="FAILURE";
return response;
} catch (StaleEntityException e) {
logger.info("StaleEntityException has been encountered");
// TODO Auto-generated catch block
e.printStackTrace();
response="FAILURE";
return response;
} catch (UnsupportedOperationException e) {
logger.info("UnsupportedOperationException has been encountered");
// TODO Auto-generated catch block
e.printStackTrace();
response="FAILURE";
return response;
} catch (UnknownAttributeException e) {
logger.info("UnknownAttributeException has been encountered");
// TODO Auto-generated catch block
e.printStackTrace();
response="FAILURE";
return response;
} catch (ProviderException e) {
logger.info("ProviderException has been encountered");
// TODO Auto-generated catch block
e.printStackTrace();
response="FAILURE";
return response;
}

}

异常:

java.lang.reflect.InvocationTargetException
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)
Caused by: java.lang.NumberFormatException: For input string: "BYUNJ"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:441)
at java.lang.Long.parseLong(Long.java:483)
at oracle.iam.oimdataproviders.impl.OIMUserDataProvider.modify(OIMUserDataProvider.java:614)
at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.modifyEntity(EntityManagerImpl.java:607)
at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.modifyEntity(EntityManagerImpl.java:564)
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:35)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy362.modifyEntity(Unknown Source)
com.thortech.xl.dataobj.util.tcAdapterTaskException: For input string: "BYUNJ"
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpHRBPGROUPASSIGN.ASSIGNHRBPGROUP(adpHRBPGROUPASSIGN.java:121)
at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpHRBPGROUPASSIGN.implementation(adpHRBPGROUPASSIGN.java:60)
at com.thortech.xl.client.events.tcBaseEvent.run(tcBaseEvent.java:221)
at com.thortech.xl.dataobj.tcDataObj.runEvent(tcDataObj.java:2496)
at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(tcScheduleItem.java:3437)
at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(tcScheduleItem.java:811)
at com.thortech.xl.dataobj.tcDataObj.insert(tcDataObj.java:606)
at com.thortech.xl.dataobj.tcDataObj.save(tcDataObj.java:478)
at com.thortech.xl.ejb.beansimpl.tcProvisioningOperationsBean.retryTasks(tcProvisioningOperationsBean.java:4635)
at Thor.API.Operations.tcProvisioningOperationsIntfEJB.retryTasksx(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.ReflectiveMethodInvoca

最佳答案

我想我从未尝试过使用 EntityManager 或 UserManager 进行用户登录。请改用 usr_key。

关于java - OIM 中的实体管理器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50961698/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com