The DSOM error codes mentioned below can be obtained directly by the application from the "minor" field of the exception data returned in a system exception, or from an error report message when SOMDDEBUG is set to a positive integer value (see the previous topic, "Error reporting").
Symptom: When running regimpl, a "PERSIST_STORE" or "NO_IMPLEMENT" exception is returned. The DSOM error code is SOMDERROR_IO or SOMDERROR_NoImplDatabase.
Symptom: When starting somdd, an "INITIALIZE" exception is returned with error code SOMDAlreadyRunning.
Symptom: When starting up a server program, an exception is returned with a DSOM error code of SOMDERROR_ServerAlreadyExists.
Symptom: On OS/2, an operating system error occurs indicating a "stack overflow" condition soon after a the first call to a class DLL. Rebuilding the DLL with a larger stack size does not help.
An example _DLL_InitTerm function is included in the DSOM sample code shipped with the SOMobjects Developer Toolkit for OS/2, in the file "initterm.c".
Symptom: When running a DSOM application that uses EMan, an error message is displayed asking that the SOMSOCKETS be set.
Symptom: A remote method invocation fails and an "INTF_REPOS" exception is returned. The DSOM error code is SOMDERROR_BadDescriptor or SOMDERROR_ClassNotlnIR.
If the default SOM IR (supplied with the SOMobjects Toolkit and Runtimes) is not used by the application, the user's IR must include the interface definitions for the appropriate Sockets class, server class (derived from SOMDServer), and the definitions of the standard DSOM exceptions (found in file "stexcep.idl") that may be returned by a method call.
Symptom: A SOMDERROR_ClassNotFound error is returned by a client either when creating a remote object using somdNewObject, or when finding a server object using somdFindAnyServerByClass. (The methods are defined on the SOMDObjectMgr class.)
Symptom: A SOMDERROR_ClassNotlnlR error is returned by a server when creating a new object using somdNewObject, somdCreateObj, or somdGetClassObj.
Symptom: When invoking a method returns a proxy for a remote object in the client, a SOMDERROR_NoParentClass error occurs.
Symptom: Following a method call, the SOM run-time error message, "A target object failed basic validity checks during method resolution" is displayed.
Symptom: A remote object has an attribute or instance variable that is, or contains, a pointer to a value in memory (for example, a string, a sequence, an "any"). The attribute or instance variable value is set by the client with one method call. When the attribute or instance variable is queried in a subsequent method call, the value referenced by the pointer is "garbage".
In a DSOM application, a class should not assume ownership of memory passed to it in a method parameter unless the IDL description of the method includes the SOM IDL modifier object_owns_parameters. Otherwise, if a parameter value is meant to persist between method invocations, then the object is responsible for making a copy of the parameter value.
Symptom: A method defines a (char *) parameter that is used to pass a string input value to an object. The object attempts to print the string value, but it appears to be "garbage".
While (char *) is commonly used to refer to NULL-terminated strings in C programs, (char *) could also be a pointer to a single character or to an array of characters. Thus, DSOM interprets the argument type literally as a pointer-to-one-character.
To correctly pass strings or array arguments, the appropriate CORBA type should be used (for example, "string" or "char foo[4 ]").
Symptom: A segmentation violation occurs when passing an "any" argument to a method call, where the "any" value is a string, array, or object reference. Note: The NamedValues used in DII calls use "any" fields for the argument values.
Symptom: When a server program or a server object makes a call to get_id or to get_SOM_object on a SOMDObject, a "BAD_OPERATION" exception is returned with an error code of SOMDERROR_WrongRefType.
Symptom: A segmentation fault occurs when a SOMD_Uninit call is executed.
Symptom: Unexplained program crashes.
Symptom: When starting somdd, an "INITIALIZE" error is returned with error code SOMDERROR_NoSocketsClass.