Handling xfNetLink .NET exceptions

All xfNetLink .NET exceptions are thrown as System.Exception. In your code, you should catch Exception. The error text associated with the exception will tell you what the specific problem is. Check the table below for the likely cause and possible solutions for specific errors. Some errors may include additional text that was generated by the system or xfServerPlus. You may also see xfServerPlus status codes returned to the client. Refer to the xfServerPlus Status Codes table.

Note

When you get an error, the log file can provide information about what went wrong. See Using client-side logging. All errors are also written to the Windows application event log, regardless of whether client-side logging is turned on.

xfNetLink .NET Exceptions

Error message

Cause

What to do

Call to SSPI failed, see inner exception

Client and server were unable to establish secure communicate because they do not share a common algorithm.

Verify that the security compliance level is the same on both the xfNetLink and xfServerPlus machine. Check your encryption configuration; see Using xfServerPlus encryption.

Class className does not have a method named methodName

The specified method does not exist in the specified class.

Correct your client code. Consult the API documentation or the Object Browser in Visual Studio to determine the valid methods for this class.

Connection timed out

xfNetLink .NET timed out because of very slow start up.

Increase the connect time-out value. See Specifying configuration settings.

Could not create new process

(Win, Unix) Could not launch dbs process.

Ensure that dbs.exe exists on the xfServerPlus machine and that DBLDIR is correctly set.

DBLDIR not set

The DBLDIR environment variable is not set on the server.

Set DBLDIR on the xfServerPlus machine.

Delimiter delimiter not found in packet

The packet is missing a delimiter. This message indicates a badly formed packet. The delimiter may be any of the following: # ( ) ; :

Retry. The problem may be noise on the line or some other type of transmission error.

Expected DateTime type not found

A date or time data type other than DateTime was sent. xfNetLink .NET supports only the DateTime data type for dates.

Correct your client code to use a DateTime data type. See Appendix C: Data Type Mapping for xfNetLink .NET.

Host or port not configured properly

The host and/or port setting have not been set properly in the config file or with the environment variables.

Or, the program defaults are being used (localhost and 2356), and those values are invalid.

If you are specifying host and port values, see Specifying configuration settings.

If you are using the default values, verify that xfServerPlus is running as localhost on port 2356.

Incompatible client version

The xfNetLink .NET version is incompatible with the xfServerPlus version.

Upgrade the client or the server to the higher version. Running a newer client with an older server is not a supported configuration.

Initialize method failed

(pooling only) The Initialize( ) method (defined in the SMC) failed on the xfServerPlus side.

Consult xfpl.log for details on why the method failed. It may be the case that the initialize time-out occurred before the method completed.

Insufficient memory on server

(Win) Could not launch dbs process due to insufficient memory on the server.

Check the resources on your xfServerPlus machine.

Invalid date/time: passed Format: expected

Data in a date/time user-defined field (in a repository structure) is not in the expected format. The message will show you what was passed and the expected format.

Check the format of the data in your server-side code.

Invalid parameter number

The number of parameters passed to xfServerPlus does not match the number of parameters returned.

Check both your client-side and server-side code to verify that you are passing the correct number of parameters.

Invalid security compliance level level

Invalid value passed for the scl parameter to the connect() or debugStart() method.

Correct your code to pass 0 or 2.

Invalid synergy type sent. Structure size passed and SMC size declared don’t match.

The size of the parameter in the call doesn’t match the size in the SMC. The error message includes the parameter number.

Check the definition of the method to see what size the parameter should be. Correct your code if necessary. If the error is in the SMC, update it and regenerate the assembly. If the parameter is a structure, the problem may be that the repository was updated, but the SMC was not. See Verifying repository structure sizes and enumerations.

Launch reply returned error

An error occurred in the response from xfServerPlus.

Refer to the error message for additional detail describing the problem. The message may include an additional error code returned by xfServerPlus; if so, see the xfServerPlus Status Codes table.

Logicals are not valid as logfile locations: logicalName

The log file setting was declared using a logical.

Change the value of the log file setting in the config file (see Creating and editing configuration files) or specified with XFNLNET_CLASS_LOGFILE to a path and filename.

Login failed

(Win, Unix) Invalid username or password used to start xfServerPlus.

Ensure that the username and password are correct for xfServerPlus. See Running xfServerPlus on Windows or Running xfServerPlus on Unix.

Method information must be passed to callMethod

Attributes for the method being called are not being passed to xfNetLink. (These attributes contain information about the method.)

This error occurs only when attribute information in the generated C# code has been altered or removed. If you know what was changed, you can correct the code. Otherwise, you must regenerate the classes (run gencs) and rebuild the assembly.

Missing class attribute for className

An attribute for className is missing. This attribute declares the length of a structure class.

This error occurs only when attribute information in the generated C# code has been altered or removed. If you know what was changed, you can correct the code. Otherwise, you must regenerate the classes (run gencs) and rebuild the assembly.

Missing field attribute for fieldName

An attribute for fieldName is missing from a structure class. This attribute contains the Synergy data type and length of the field.

Missing method attribute for methodName

An attribute for methodName is missing. This attribute contains the name of the method in the SMC to call.

Missing parameter attribute for parameterName

An attribute for parameterName is missing. This attribute contains the Synergy data type and length of the parameter.

No elements in array

An array was declared with no elements and then passed as a parameter.

Correct your client code to declare the elements in the array and, if it’s an “In” or “In/Out” parameter, set optional values for each element.

No runtime license

There is no Synergy Runtime license on the xfServerPlus machine.

Install a Runtime license on the xfServerPlus machine.

Number of fields does not match

The number of fields returned by xfServerPlus does not match the number of fields in the structure class.

Check both your client-side and server-side code to verify that you are passing the correct number of fields for the structure.

Packet length error

The response message from xfServerPlus has an invalid packet length. This message indicates a badly formed packet.

Retry. The problem may be noise on the line or some other type of transmission error.

Parameter direction mismatch

The parameter direction (In, Out, or In/Out) is defined differently in the SMC than it is in the assembly.

Ensure that the parameter is defined correctly in the SMC and then regenerate the classes (run gencs) and rebuild the assembly.

Parameter number mismatch

The method call contains more or fewer parameters than the method supports.

Check your client code to verify that you are passing the correct number of parameters in your call.

Parameter type mismatch

The data type of a parameter sent back from xfServerPlus does not match the data type on the client side.

Check both your client-side and server-side code to determine where the error is.

It may be the case that the server-side code was changed, but the SMC was not updated. If this is the case, you will need to update the SMC, regenerate the classes, and then rebuild the assembly.

Past end of packet

A badly formed packet caused xfNetLink to try to read more data than is in the packet.

Retry. The problem may be noise on the line or some other type of transmission error.

Returned array size does not match size of array in parameter

xfServerPlus returned an array that does not match the size of the array on the client side.

Check both your client-side and server-side code to verify that the array size is declared correctly.

Unexpected attribute type attributeType

The generated code contains an unsupported attribute type named attributeType.

This error occurs only when attribute information in the generated C# code has been altered or removed. If you know what was changed, you can correct the code. Otherwise, you must regenerate the classes (run gencs) and rebuild the assembly.

Unexpected data type

The data in the parameter is not the correct type (e.g., alpha data in a decimal parameter).

Correct your client code. See Appendix C: Data Type Mapping for xfNetLink .NET.

Or, it may be the case that the parameter data type was entered incorrectly in the SMC, in which case you will need to correct the SMC, regenerate the classes, and rebuild the assembly.

Unexpected error

A server-side error occurred.

Note the error number; save your error log; contact Synergy/DE Developer Support.

Unexpected string in message

An unknown string of data was found in the packet. This message indicates a badly formed packet.

Retry. The problem may be noise on the line or some other type of transmission error.

Unsupported date/time format format

A structure in the repository uses an unsupported date/time format.

Correct the structure in the repository. Then, you must update the SMC, regenerate the classes, and rebuild the assembly. For information on supported data types, see Appendix C: Data Type Mapping for xfNetLink .NET.

xfServerPlus license count exceeded

xfServerPlus has exceeded the number of available licenses.

Contact Synergex Customer Service to purchase additional licenses.

xfServerPlus license expired

The 14-day demo period or an extended demo period has expired.

Contact Synergex Customer Service to purchase a license.

xfServerPlus not licensed

There is no license for xfServerPlus.

Purchase a license.

xfServerPlus not supported by the running server

xfServerPlus is not running on the specified port.

Verify that xfServerPlus is running on the default port or the port specified in the config file or passed by the connect() method.

xfServerPlus version not supported

The version of xfServerPlus is not compatible with the version of xfNetLink for the current operation.

Upgrade xfServerPlus to the most current version.