You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Getting error 'Unknown key of uninstantiated object {USER_PROFILE.UserID} (91,16)' while saving Component Interface

4 replies [Last post]
Guest's picture
Guest

I am getting the error 'Unknown key of uninstantiated object {USER_PROFILE.UserID} (91,16)' while saving the component interface using the following code:-

SQLExec("Select OPRID from PSOPRALIAS where PERSON_ID = :1", RD_PERSON.PERSON_ID.Value, &lstrOPRID);

If All(&lstrOPRID) Then
try
rem ***** Set the Log File *****;
&fileLog = GetFile("C:\temp\USER_PROFILE.log", "w", "a", %FilePath_Absolute);
&fileLog.WriteLine("Begin");
&oSession = %Session;
&oSession.PSMessagesMode = 3;

&oUserProfile = &oSession.GetCompIntfc(CompIntfc.USER_PROFILE);
If &oUserProfile = Null Then
errorHandler();
throw CreateException(0, 0, "GetCompIntfc failed");
End-If;

&oUserProfile.InteractiveMode = True;
&oUserProfile.GetHistoryItems = True;
&oUserProfile.EditHistoryItems = True;

&oUserProfile.UserID = &lstrOPRID;

If Not &oUserProfile.Get() Then
errorHandler();
throw CreateException(0, 0, "Get failed");
End-If;

If RD_PERSON.HNSPERSONSTATUS.OriginalValue <> "I" And
RD_PERSON.HNSPERSONSTATUS.Value = "I" Then
&oUserProfile.AccountLocked = 1;
End-If;

If Not &oUserProfile.Save() Then
errorHandler();
throw CreateException(0, 0, "Save failed");
End-If;

catch Exception &ex
WinMessage(&ex.ToString());
&fileLog.WriteLine(&ex.ToString());
end-try;

&fileLog.WriteLine("End");
&fileLog.Close();
End-If;

Then subsequently, I get the following errors:-

(18,2) - Data being added conflicts with existing data. (18,2)

(91,37) - Error saving Component Interface. {USER_PROFILE} (91,37)

Lepa's picture
User offline. Last seen 2 years 2 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Getting error 'Unknown key of uninstantiated object ...

I would try debugging the component interface from PeopleCode. To accomplish that you need to modify a delivered function. The function is located at FUNCLIB_CI.CI_EXCEPTIONS FieldFormula and is called ciCreateExceptionEntry

Right after the following code

If All(&MsgSetNbr, &MsgNbr) Then
&ExceptionRec.MSG_SEVERITY.Value = ciGetSeverity(&MsgSetNbr, &MsgNbr);
End-If;

add this:
MessageBox(0, "", 0, 0, "Error Message: " | &ExceptionRec.MESSAGE_TEXT.Value);

Now when a CI is called and an error occurs you will get a messagebox on the screen indicating the error. Hopefully this will give you a more meaningful error.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: Getting error 'Unknown key of uninstantiated object ...

PeopleTools version : 8.48.05 does not have record FUNCLIB_CI.

I get the following errors:-

(91,16) - Unknown key of uninstantiated object {USER_PROFILE.UserID} (91,16)

(18,2) - Data being added conflicts with existing data. (18,2)

(91,37) - Error saving Component Interface. {USER_PROFILE} (91,37)

Invalid message while SQL transaction in process: Save failed (0,0) RD_PERSON_2.GBL.SavePostChange PCPC:8408 Statement:81 (2,178) RD_PERSON_2.GBL.SavePostChange PCPC:8511 Statement:84

A PeopleCode program tried to issue the indicated message while an SQL cursor is open. The message is invalid because it requires user input.

Review the PeopleCode and either move the message to a place where it will be issued during user "think-time", or change the "style" so no choice is required.

simrose's picture
User offline. Last seen 6 years 14 weeks ago. Offline
Joined: 08/01/2008
Posts: 33
Re: Getting error 'Unknown key of uninstantiated object ...

I guess SQLExec("Select OPRID from PSOPRALIAS where PERSON_ID = :1", RD_PERSON.PERSON_ID.Value, &lstrOPRID) is not returning an object that why String &lstrOPRID is null and USER_PROFILE.UserID is uninstantiated

Lepa's picture
User offline. Last seen 2 years 2 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Getting error 'Unknown key of uninstantiated object ...

simrose makes a good point.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog