Exceptions thrown by NDO
NDO throws either objects of type NDOException, QueryException or InternalException. NDOException and QueryException objects both provide a Property ErrorNumber, which enables programmers to distinguish between different causes for the exception. Note that QueryException is derived from NDOException.
The following two tables show all ErrorNumber values of NDOException and QueryException and their meaning.
Important:
NDO does not catch exceptions thrown by .NET library functions, like NullException. These exceptions will fall through to the user code.
All exceptions raised in the ADO.NET code will be caught by NDO and packed into an NDOException. The message of the caught exception will appear in the NDOException.
InternalExceptions shouldn’t happen at all. If they occur, they probably are sign of an NDO bug. Please report the exception text to the NDO developer support.
NDOException Error Numbers
1 |
AddRange: container is null |
2 |
InsertRange: container is null |
3 |
SetRange: container is null |
4 |
RemoveRange: container is null |
5 |
Adding related object [of type ...: ]container is null |
6 |
DbType name ... unknown. |
7 |
Can't find mapping information for field ....... |
8 |
Can't find mapping information for relation .... |
9 |
Invalid mapping: unknown field name ... in type . |
10 |
Assembly for Type ... not found. |
11 |
Type.GetType for the type name ... failed; check your mapping File. |
12 |
Can't construct update dependencies for class .. |
13 |
Missing nested class MetaClass for type '...'; the assembly does not seem to be enhanced. |
14 |
Can't convert ... into a .NET type. |
15 |
Can't find NDO dll in the registry. Please install NDO again |
16 |
Can't find a Connection object with the ID ... in the mapping file; Check the mapping info for the class '..... '. |
17 |
Can't find mapping information for class ... |
18 |
Class ... has too many relations. |
19 |
Error while attempting to create a database: . |
20 |
Can't find field ....... |
21 |
Polymorphic 1:n-relation w/o mapping table is not supported |
22 |
Can't load type: ..., ... |
23 |
Parent|ChildRelation Attribute missing in DualKey oid mapping. |
24 |
Can't find mapping table '...' in the schema. Check your mapping file. |
25 |
Exception in dataAdapter.Fill: ... |
26 |
Exception in dataAdapter.Update: ... |
27 |
Can't convert ... into a DbType type. |
27 |
NDOOleDbProvider.GetDbType: Type ... can't be converted into an OleDbType. |
27 |
NDOOracleProvider.GetDbType: Typ name ... can't be converted into an OracleType |
27 |
NDOOracleProvider.GetDbType: Type ... can't be converted into an OracleType. |
27 |
NDOSqlProvider.GetDbType: Type ... can't be converted into a SqlDbType. |
27 |
NDOSqlProvider.GetDbType: Type name ... can't be converted into a SqlDbType. |
28 |
Relations to intermediate classes must have RelationMultiplicity.List. |
29 |
Can't register OleDb update handler for data adapter of type .... |
30 |
Persistence manager initialization error: ... |
31 |
Parameter should implement IPersistenceCapable. Check if the type ... is enhanced. |
32 |
The provider of type ... doesn't support Autonumbered Ids. Use Self generated Ids instead. |
33 |
Can't read autonumbered id from the database. |
34 |
There is no provider of Type ... in the NDOProviderFactory. Check if you have to add a NDO provider plug-in, or use [SqlServer|OleDb|Oracle|Access] as Connection Type |
35 |
Class '...': 'oid' is not a valid aggregation field for intermediate classes, because the oid is not mapped to a single column. |
36 |
Wrong Relation: .... Relations to intermediate classes are not allowed. |
37 |
Exception of Type ... while updating or inserting data rows: ... |
38 |
Exception of type ... while deleting data rows: . |
39 |
Can't find table '...' in the schema. Check your mapping file. |
40 |
Exception of type ... while executing a Query: .. |
41 |
One of the two defining relations of an intermediate class object is null - look at the documentation how to initialize intermediate class objects. |
42 |
Wrong argument type: MergeObjectContainer expects either an ObjectContainer or a ChangeSetContainer object as parameter. |
43 |
ObjectId.CompareTo: Can't compare with an object of type ... |
44 |
Connection object is null, or connection name is null or empty. |
45 |
Mapping File ... doesn't exist. |
46 |
Invalid PersistenceHandlerType: ... |
47 |
Log path doesn't exist: ... |
48 |
Script file ... doesn't exist. |
49 |
Can't determine the path of the entry assembly - please pass a mapping file path as argument to the ctor of PersistenceManager. |
50 |
Error while merging a ChangeSetContainer: Child . doesn't exist in relation ... |
54 |
MakePersistent: Object is already persistent: ... |
55 |
1:n Relations with subclasses must use a mapping table: ... |
56 |
Object is already part of another relation: ... |
57 |
Cannot construct IList member .... Initialize the field in the default class constructor. |
58 |
Can only add transient objects in Composite relation ...->.... |
59 |
Can only add persistent objects in Assoziation .->.... |
60 |
AddRelatedObject: Related object must be assignable to type: .... Assigned object was: ... Type = ... |
61 |
Can't assign object of type ... to relation .... The parent object must be saved in an own transaction to retrieve the Id first. As an alternative you can use client generated Id's or a mapping table. |
62 |
Can't assign object of type ... to relation .... Can't handle a polymorphic composite relation with cardinality 1 with autonumbered Id's. Use a mapping table or client generated Id's. |
63 |
Can't assign an object of type ... to relation .. The child object must be saved in an own transaction to retrieve the Id first. As an alternative you can use client generated Id's or a mapping table. |
65 |
Cannot remove transient related object ... from parent ... |
67 |
Can't remove object from the list .... The list is null. |
68 |
Error while writing the embedded object {0} of an object of type {1}. Check your mapping file. |
69 |
Error while writing to a field of an object of type .... Check your mapping file.... |
70 |
Error while reading a field of an object of type .. Check your mapping file.... |
71 |
Error while reading the embedded object {0} of an object of type {1}. Check your mapping file. |
72 |
LoadData: Object ... is not present in the database. |
73 |
LoadAndMarkDirty: Access to deleted objects is not allowed. |
74 |
Can't clone IList of type .... ... |
75 |
Can't resolve subclass type code {0} of type {1} - check if your NDOTypes.xml exists. |
76 |
Error while loading related objects: Can't find relation mapping for the field {0}.{1}. Check your mapping file. |
78 |
ReadId: Unknown type in Id Column: ... |
79 |
MakeTransient: Illegal state '...' for this operation |
80 |
Can't delete transient object: ... |
82 |
Cannot remove related object ... from parent .... Object must be removed through the parent. |
83 |
Can't remove object of type ...; It is contained by an object of type ... |
85 |
MakeHollow: Illegal state for this operation (...) |
86 |
FindObject: Invalid object id. Object does not exist |
87 |
Refresh: Illegal state ... for this operation |
88 |
Can't find foreign keys for the relations of the object ... |
89 |
Can't construct a connection object: .... Check your connection string. |
91 |
Can't compute StDev or Var over more than one table. |
94 |
No Type Code for .... Check NDOTypes.xml |
95 |
Invalid Assembly Fullname: {0} |
96 |
No mapping information found for relation ....... |
97 |
Can't determine relation type for relation {Parent.FullName}.{fi.Name} |
98 |
Can't find Oid mapping information for class ... |
100 |
Can't find Oid mapping information for class ... |
101 |
Can't determine referenced type in relation x. Provide a type parameter for the [NDORelation] attribute. |
102 |
No connection defined in class mapping for type .. Check your mapping file. |
103 |
Provider with type ... doesn't exist. Check your mapping file or plug-in directory |
104 |
No type name column defined for generic type .... Check your |
105 |
No type name column defined for generic type .... Check your |
106 |
Null entry in the TypeNameColumn of the type ... |
107 |
Can't convert... to .... The source type has to be an IConvertible |
108 |
Can't assign value of type ... to XxxKey.Value. (This exception |
109 |
Wrong relation name in OidColumn definition for column .... The RelationName must denote an existing relation with RelationMultiplicity.Element. |
110 |
Count of Oid columns with relation name ... is different from count of foreign key columns of the named relation. Expected: .... Count of OidColumns was: .... |
111 |
Invalid field type for relation .... Type: ... |
112 |
Type ... has more than one autoincremented column. This is not supported by NDO. Check your mapping file or the OidColumn attributes in the source code. |
113 |
Wrong Oid mapping for type .... You can't mix OidColumns with and without a RelationName. |
114 |
Wrong oid index in query: '...'. Size of Oid column array of type ... is .... |
115 |
Column count between relation and Oid doesn't match. Type ... has an oid column count of .... The Relation ... has a foreign key column count of .... |
116 |
Cant find a resolvable constructor for class '{t.FullName}' |
117 |
InitFields: MemberInfo of the persistent field {FullName}.{memberInfo.Name} should be a FieldInfo or a PropertyInfo |
118 |
Field {field.Name} can't be encrypted. Encrypted fields must be of type string. Change the Encrypted attribute in your mapping file. |
119 |
Can't construct connection for {connStr}. The provider returned null. |
120 |
Can't delete transient object |
QueryException Error Numbers
10001 |
Empty string parameters are not allowed in Oracle. Use IS NULL instead. |
10002 |
... result objects in ExecuteSingle call |
10003 |
Wrong ValueType or embedded type member name: ... |
10004 |
Can't construct queries across different DB connections |
10005 |
Wrong ValueType or embedded type member name: ... |
10006 |
Can't construct SQL condition string due to the polymorphic type ... |
10007 |
LoadRelations with wrong expression string: |
10008 |
FileTime or FileTimeUtc without value |