Я использую EntityManager API в OIM для обновления атрибута. Ниже приведен код. Но я получаю исключение в «entMgr.modifyEntity («Пользователь», userLogin, mapAttrs);». Это из-за использования userlogin? и я получаю логин пользователя от адаптера во время выполнения, и это строка. Может кто-нибудь, пожалуйста, помогите мне в этом?
код:
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
BYUNJ
в числовом поле. Вы даже пытались отладить это? - person Nico Haase   schedule 21.06.2018