Windows Clients
SAS Object Manager Error ReportingIf a call succeeds in obtaining an object, the method returns S_OK. However, there are many reasons an error might occur. Sometimes an error might occur even before the connection attempt is made. An example of such an error follows:
Other errors can occur during the connection attempt. Examples include the following:
Errors can occur even though a successful connection is established. Errors that occur during connection can be reported through the logging mechanism. To enable logging, set the ObjectFactory.LogEnabled property to TRUE. When LogEnabled equals TRUE, both successful and failed connection attempts are recorded in the log. You can obtain error information by calling GetCreationLog as follows: ObjectFactory.GetCreationLog(erase,allThreads) The parameters for GetCreationLog follow:
Error XMLThe error information returned through XML allows applications to fix detected problems. Applications can be used to fix these errors by parsing the XML and possibly providing a user interface or sending a message to an administrator to have the errors fixed. The following example is an output from GetCreationLog. The first attempt establishes an IOM Bridge connection to the SAS Metadata Server, and the second attempt establishes a COM connection to a workspace server. Note that the sasport and sasmachinednsname are not reported for COM connections. <connectionAttempts> <connectionAttempt> <description>Connected.</description> <status>0x0</status> <saslogin>myDomain\myLogin</saslogin> <sasmachinednsname>myMachine</sasmachinednsname> <sasport>1235</sasport> <sasclassid>2887E7D7-4780-11D4-879F-00C04F38F0DB</sasclassid> <sasprogid>SASOMI.OMI.1</sasprogid> <sasserver>SAS Metadata Server</sasserver> <threadid>3324</threadid> <name>OMR</name> </connectionAttempt> <connectionAttempt> <description>Connected.</description> <status>0x0</status> <saslogin></saslogin> <sasmachinednsname>myOtherMachine</sasmachinednsname> <sasclassid>440196D4-90F0-11D0-9F41-00A024BB830C</sasclassid> <sasprogid>SAS.Workspace.1</sasprogid> <sasserver>myOtherMachineCOM - Workspace Server</sasserver> <threadid>3324</threadid> </connectionAttempt> </connectionAttempts> The following error message shows a failed IOM Bridge connection attempt. Note that the port number, machine name, and login are listed for IOM Bridge connections. <connectionAttempts> <connectionAttempt> <description>Could not establish a connection to the SAS server on the requested machine. Verify that the SAS server has been started with the -objectserver option or that the SAS spawner has been started. Verify that the port Combridge is attempting to connect to is the same as the port SAS (or the spawner) is listening on.</description> <status>0x8004274d</status> <saslogin>Username</saslogin> <sasmachinednsname>machineName</sasmachinednsname> <sasport>1234</sasport> <sasclassid>440196D4-90F0-11D0-9F41-00A024BB830C</sasclassid> <sasprogid>SAS.Workspace.1</sasprogid> <sasserver>myWorkspace - Workspace Server</sasserver> <threadid>3324</threadid> </connectionAttempt> </connectionAttempts> |