Updating attribute in IManufacturerPart causing issue
We are trying to upgrade agile from 932 to 936. When updating attribute – Created By on page 2 of manufacturerparts I am getting error. Same code works fine in agile 932. Please check the snippet and error details below.
Code:
IAgileSession agileSession = null;
Map<Integer, String> lsParams = new HashMap<Integer, String>();
lsParams.put(AgileSessionFactory.USERNAME, “test123”);
lsParams.put(AgileSessionFactory.PASSWORD, “5342gdfgte”);
AgileSessionFactory agSessFactory;
agSessFactory = AgileSessionFactory.getInstance(“https://agile-tst.test.com:7002/Agile”);
agileSession = agSessFactory.createSession(lsParams);
Map<Integer, String> params = new HashMap<Integer, String>();
params.put(ManufacturerPartConstants.ATT_GENERAL_INFO_MANUFACTURER_NAME, “HODGE PRODUCTS INC(HODGE)”);
params.put(ManufacturerPartConstants.ATT_GENERAL_INFO_MANUFACTURER_PART_NUMBER, “100-TEST-TDV”);
IManufacturerPart mfrpart = (IManufacturerPart) (agileSession
.getObject(ManufacturerPartConstants.CLASS_MANUFACTURER_PART, params));
System.out.println(mfrpart.getValue(ManufacturerPartConstants.ATT_PAGE_TWO_TEXT02));
mfrpart.setValue(ManufacturerPartConstants.ATT_PAGE_TWO_TEXT02, “mohansee”);
Error Details:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerException
at weblogic.utils.StackTraceDisabled.unknownMethod()
Caused by: java.lang.NullPointerException
… 1 more
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerException
at weblogic.utils.StackTraceDisabled.unknownMethod()
Caused by: java.lang.NullPointerException
… 1 more
Error code : 985
Root Cause exception : java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerException
at com.agile.api.pc.APIObject.createError(APIObject.java:131)
at com.agile.api.pc.Row$SetValueAction.doSdkAction(Row.java:1218)
at com.agile.api.common.SDKAction.run(SDKAction.java:23)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:368)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:163)
at weblogic.security.Security.runAs(Security.java:61)
at com.agile.api.common.WebLogicAuthenticator.doAs(WebLogicAuthenticator.java:111)
at com.agile.api.common.Security.doAs(Security.java:54)
at com.agile.api.common.Security.doAs(Security.java:109)
at com.agile.api.pc.Row.doServerSetValue(Row.java:496)
at com.agile.api.pc.Row.doSetValue(Row.java:330)
at com.agile.api.pc.Row.setValue(Row.java:292)
at com.agile.api.pc.Row.setValue(Row.java:303)
at com.agile.api.pc.DataObject.setValue(DataObject.java:201)
Mohan.S
I’ve been dealing with the same thing today. Try using Common Constants:
mfrPart.setValue(CommonConstants.ATT_PAGE_TWO_TEXT01, “newvalue”)
I got the same issue in 9.3.5 also in Java-client i was getting Null pointer exception while saving any p2 value of a manufacturer part. It got resolved by 9.3.5.2 hot-fix. If your issue in the same line, i suggest you go for Oracle SR.