Tuesday, November 17, 2009

Trying to Schedule Query gives message "An error has occurred" and kicks the user back to an Error page.


I have noticed the following issue on PeopleTools 8.48.16.

  1. Go to Reporting Tools -> Query -> Schedule Query -> Add a new Value –> TEST
  2. Enter the query name : ERROR_QUERY and tab out of the field.
  3. This displays the run time prompt page. Enter the value and hit OK or CANCEL
  4. Page shows flashing Processing image and displays the page "An error has occurred" eventually. Appserver log shows that a core file is generated.



To fix the issue, open the query in Query Manager from PIA. Change the query properties –> Description and resave the query. This fixes the issue.

Friday, October 09, 2009

Could not sign on to database xxxx with user yyyy for app engine program

When trying to run appengine program from command line (psae), you are getting this message

“Could not sign on to database xxxx with user yyyy for app engine program”

One possible reason is that psae needs database name in upper case. If you are using lower case name then the above message appears.

Also PS_SERVER_CFG must contain the fully qualified name of a correctly configured Process Scheduler PSPRCS.CFG file

For e.g.


PS_SERVER_CFG=$PS_HOME/appserv/prcs/<domainname>/psprcs.cfg;export PS_SERVER_CFG

psae -CT ORACLE -CD dbname-CO userid -CP password -R runcontrolid -I 0 -AI <appengine progname>

Also When PeopleSoft Application Engine runs from the command line, it resolves %PS_SERVDIR% to the value of the environment variable PS_SERVDIR instead of the parent directory of a Process Scheduler configuration.

Monday, September 14, 2009

An error has occurred that has stopped this transaction from continuing.

The above error may happen when doing the following in Enterprise Portal:

Navigation: Portal Administration -> Branding -> Define Headers or Define Footers (Add / View existing Value)

Add a New Value or Find An existing Value

Set Header ID: TEST1

You will get this message "An error has occurred that has stopped this transaction from continuing."

This message appears in Enterprise Portal due to 0 rows in PS_INSTALLATION Table. To fix this issue: Insert a row in PS_INSTALLATION table and  restart the appservers.

The SQL I have used is as follows.


Tested this with Enterprise Portal 8.8 and PeopleTools 8.48.16

Thursday, January 15, 2009

Validate Userid and password against LDAP directories Using PeopleCode

Following peoplecode is tested in 8.48.16 and assuming that you are using Oracle Wallet and LDAP libraries for connecting to ldap server. (Tested on HP*UX 11.11 server). It also assumes you have LDAP Port, Server name, Default Connect DN defined in PeopleTools -> Security -> Directory ->  Directory Configuration. LDAPS Port is optional but highly recommended. This can be used in following scenarios.

You are logged in PeopleSoft with generic id and you need to validate user's password against ldap directory. Or you want to see  programmatically if the user exist in LDAP with a valid password.


Create this as Class to Application Package: XX_UTILS

class LDAP
method ValidatePassword(&userid As string, &pwd As string, &directory_id As string) Returns boolean;

method ValidatePassword
/+ &userid as String, +/
/+ &pwd as String, +/
/+ &directory_id as String +/
/+ Returns Boolean +/
Local string &defaultDN, &dn, &outDN, &server, &SSL;
Local integer &port, &nonsslport, &sslport, &EXECRSLT, &start, &num_chars, &ret;
Local Interlink &LDAP_BIND;
Local BIDocs &rootInDoc, &rootOutDoc;

SQLExec("select a.DSCNCTDN, b.DSSRVR, b.LDAPPORT, b.ldapsport from PSDSDIR a, PSDSSRVR b where a.DSDIRID = :1 and a.DSDIRID = b.DSDIRID", &directory_id, &defaultDN, &server, &nonsslport, &sslport);
If All(&sslport) Then
&SSL = "YES";
&port = &sslport;
&SSL = "NO";
&port = &nonsslport;

If All(&server, &port, &defaultDN) Then

&LDAP_BIND = GetInterlink(Interlink.LDAP_BIND);
&LDAP_BIND.UserID_Attribute_Name = "uid";
&LDAP_BIND.URL = "file://psio_dir.dll";
&LDAP_BIND.BIDocValidating = "Off";
REM &LDAP_BIND.SSL_DB = "e:\certs\cert7.db";
&start = 5;
&num_chars = Find(",", &defaultDN) - &start;
&dn = Replace(&defaultDN, &start, &num_chars, &userid);
&rootInDoc = &LDAP_BIND.GetInputDocs("");
&ret = &rootInDoc.AddValue("Server", &server);
&ret = &rootInDoc.AddValue("Port", &port);
&ret = &rootInDoc.AddValue("Distinguished_Name", &dn);
&ret = &rootInDoc.AddValue("User_Password", &pwd);
&ret = &rootInDoc.AddValue("Encrypted", "NO");

If (&EXECRSLT = 1) Then
&rootOutDoc = &LDAP_BIND.GetOutputDocs("");
&ret = &rootOutDoc.GetValue("Distinguished_Name", &outDN);
If &outDN = &dn Then
Return True;

Return False;

code to call the function.


Local XX_UTILS:LDAP &ldap = create XX_UTILS:LDAP();
Local boolean &return;

= "userid"
&pwd = "xxxx";
= "LDAP";
&return = &ldap.ValidatePassword(&userid, &pswd, &directory_id);
If &return Then
/* success */
/* failure */