Oracle9iAS TopLink Troubleshooting Guide Release 2 (9.0.3) Part Number B10068-01 |
|
This section contains information on troubleshooting the Mapping Workbench. In addition to the information in this chapter, refer the Oracle9iAS TopLink: Mapping Workbench Reference Guide and online help for detailed information.
The following Mapping Workbench errors messages (listed in alphabetical order) may appear in the status bar. Each message includes a description of the action that caused the error and the recommended resolution.
When creating a one-to-one mapping for EJB descriptors in projects with 2.0 CMP persistence, you must select the ValueHolder indirection option on the mapping's General tab.
When creating a one-to-many or a many-to-many mapping for projects with 2.0 CMP persistence, you must select the Transparent indirection option on the mapping's General tab.
You created a transformation mapping, but did not specify a complete Object > Field Method for each database field on the mapping's General tab.
You must specify a foreign key reference for the database table. Use the database table's Reference tab to add a key pair.
You selected the Optimistic Locking field on the Locking tab, but did not specify the Field.
For aggregate mappings, each Field Description on the Fields tab must contain a unique Field.
For aggregate mappings, each Field Description on the Fields tab must contain a unique Field.
Aggregate descriptors that are shared by multiple source descriptors cannot have mappings that contain a target object that references the descriptor.
For example, you cannot have multiple one-to-many and many-to-many or one-to-one mappings in which the target is the aggregate.
If you are using a 2.0 CMP persistence project, you must specify the location of the ejb-jar.xml
file on the project's General Properties tab.
You did not specify indirection or transparent indirection for the mapping. If the class attribute is of type ValueHolderInterface
, you must use value holder indirection for the mapping.
For one-to-one and transformation mappings, if the class attribute is of type ValueHolderInterface
, you must use indirection for the mapping.
You cannot select an aggregate descriptor as the Reference Descriptor for a one-to-one, one-to-many, or many-to-many mapping.
The information you entered on the EJB descriptor's EJB Info tab is incorrect, based on the project's persistence type (as specified on the project's General Properties tab).
Persistent classes that use indirection must replace the relationship attributes with a value holder (an instance of a class that implements the ValueHolderInterface
, such as ValueHolder
).
On the attribute's General mapping tab, select the Use Indirection option and specify ValueHolder type.
You specified a locking policy for a descriptor, but one of the attribute mappings is not read-only. Select the Read Only option on the mapping's General tab.
If you select the Use Indirection option for a one-to-one mapping with transparent indirection, the associated class attribute must be ValueHolderInterface.
If you select the Use Indirection (ValueHolder) option for a one-to-many, many-to-many, or direct collection mapping, the associated class attribute must be ValueHolderInterface.
You cannot use method accessing on mappings for EJB 2.0 CMP descriptors which use ValueHolder Indirection. Because EJB attributes are code-generated, reference mappings should not be set to use method access. The attributes are code-generated to be of type ValueHolder but the abstract methods are defined to return the local interface type of the related bean.
You selected Use Method Accessing for a mapping, but did not select a Get and Set method on the mapping's General tab.
A project cannot have more than one writable many-to-many mapping using the same relation table. You must either make sure only one of the mappings is writable or choose a different table for each many-to-many mapping.
This descriptor has Inheritance and Multi-Table Info advanced properties defined on it. The multi-table relationship that is defined between the base class's table and this derived class's table must be defined from base to derived.
The specified mapping does not have an associated class attribute. Either refresh the class or remove the mapping.
The inheritance hierarchy must contain one root descriptor. Select the Is Root Descriptor option on the Inheritance tab.
You selected the Use Class Indicator Dictionary option for the root descriptor in the inheritance hierarchy, but did not specify an indicator value for the root and its children. Use the Indicator Type drop-down list on the Inheritance tab for the root class.
You must select a collection type on the mapping's Collection tab.
For attributes with direct-to-field mappings, you must specify a Database Field on the mapping's General tab.
For attributes with type conversion mappings, you must specify a Database Field on the mapping's General tab.
For type conversion and object type mappings, you must select a Database Type on the mapping's General properties tab.
For direct collection mappings, you must select a Target Table and Direct Field that the direct collection specifies.
You created a transformation mapping, but did not specify an Object > Field Method. You must specify at least one field/method pair, unless the mapping is Read Only.
You created a variable one-to-one mapping, but did not specify a database field in which to store indicator values.
You created a variable one-to-one mapping, but did not specify indicator values for each object type.
For transformation mappings, you must select a Database Row -> Object Method on the mapping's General tab.
If you are creating a write-only mapping, you can ignore this warning.
You selected the Use Default Value When Database Field is Null field on a mapping's General tab but did not specify a default Type and/or Value. This message may also appear after using the Package Renamer when upgrading an older Mapping Workbench project.
You created an object type mapping, but did not select an Object Type on the mapping's General tab.
For object-type mappings, you must specify at least one mapping (Database Value and Object Value) on the mapping's General tab.
You must specify a primary key for each database table. When importing tables from a database into the Mapping Workbench, the primary key information will be retained only if the JDBC driver supports the getPrimaryKeys()
method.
Ensure that a primary key is specified for each descriptor on the Descriptor Info tab.
You must specify a foreign key field for each query key association on the Query Key Assocations tab for variable one-one mapping.
You created a variable one-to-one mapping, but did not define a key pair on the mapping's Query Key Association tab.
You must select a Reference Descriptor for each relationship mapping on the mapping's General tab.
You created a many-to-many mapping, but did not specify a Relation Table on the mapping's General tab. The relation table represents the relation between the primary keys of the source and target table.
If you select Use Sequencing on a descriptor's Descriptor Info tab, you must also specify a Name, Table, and Field.
If you select Use Sequencing on a descriptor's Descriptor Info tab, you must also specify a Name, Table, and Field.
You created a many-to-many mapping, but did not select (or create) a source table reference on the mapping's Source Reference tab.
The source table reference must contain a Source field (from the mapping's relation table) and a Target field (from one of the descriptor's associated tables).
You must select (or create) a table reference for each relationship mapping on the mapping's Table Reference tab.
You created a many-to-many mapping, but did not select (or crate) a target table reference on the mappings Target Reference tab.
The source table reference must contain a Source field (from the mapping's relation table) and a Target field (from one of the descriptor's associated tables).
For object-type mappings, you entered an Object Value that does not match the Object Type, as specified on the mapping's General tab. For example, you specified an integer type, but entered a value of A.
You must specify the Type for each database field on the Field tab.
One (or more) of the descriptors in a package contains errors. The Mapping Workbench places an error icon beside the incorrect package. Expand the package to display its descriptors.
One (or more) of the packages in your project contains errors. The Mapping Workbench places an error icon beside the incorrect project. Expand the project to display its packages.
One (or more) of the database tables in your project contains errors. The Mapping Workbench places an error icon beside the incorrect table. Expand the database object to display its tables.
Primary key field names must match across associated tables, or references must be defined from the primary table to each secondary table.
In an inheritance hierarchy, the child's primary key(s) must match the root's primary key(s)
You tried to select an inactive descriptor as a Reference Descriptor on the mapping's General tab. Either select a new Reference Descriptor or make descriptor active.
The root class in the inheritance hierarchy is set to use class indicator dictionary. It does not contain an indicator value for this child class.
One (or more) of the attributes of a descriptor contains mapping errors. The Mapping Workbench places an error icon beside the incorrect attribute(s). Expand the descriptor to display its mappings.
You created a direct collection type mapping, but did not specify the key method.
Aggregate and class descriptors cannot be in the same inheritance hierarchy.
You changed the class hierarchy within the project, causing the method access type (get or set) to no longer be visible to the class.
You changed the class hierarchy within the project, causing the copy policy to no longer be visible to the class.
The databases in a project contains errors. The Mapping Workbench places an error icon beside the database. Expand the database to display its tables.
You changed the class hierarchy within the project, causing the method to no longer be visible to the class.
Multiple mappings cannot write to the save database field. Each database field must have a single, writeable mapping.
The database field(s) for the query key(s) listed have been removed from the associated table. If you want to use these query key(s), you must specify a database field(s) for them.
Each primary key field must have a writeable mapping. Ensure that the primary key field mappings are not read only.
Each primary key field must have a writeable mapping.
You changed the class hierarchy within the project, causing the copy policy to no longer be visible to the class.
You changed the class hierarchy within the project, causing the inheritance policy to no longer be visible to the class.
When using multi-tables with differently named primary keys, you must set a reference from the TOP table to the BOTTOM table. This reference must not be an actual constraint on the database. Select the table in which this is defined and unselect the On Database option.
If an aggregate descriptor is in an inheritance policy hierarchy, all descriptors in the hierarchy must be aggregates.
You selected a table reference for a mapping, but did not add a key pair. You must specify source and target key pairs for the reference.
You selected a table reference for a relationship mapping, but did not define a source and target field key pair. For variable one-to-one mappings, you must define a query key pair (in the source descriptor's tables) to use for the common query key.
You selected a Parent Descriptor for a descriptor's inheritance policy that does not have an inheritance policy. Parent Descriptors must have a valid inheritance policy.
You created a many-to-many mapping, but did not define a source and target reference for the source reference. You must define a table reference and the appropriate key pairs for each source reference.
You created a many-to-many mapping, but did not define a source table reference on the mapping's Source tab.
You created a many-to-many mapping, but did not define a source and target reference for the target reference. You must define a table reference and the appropriate key pairs for each target reference.
You created a many-to-many mapping, but did not define a target table reference on the mapping's Target tab.
You did not associated the specified query key with a database table. You must select a database Name and Table on the Query Keys tab.
If you select the Final option on descriptor's Class Info, Class tab for a class, the class cannot contain subclasses.
When creating an inheritance policy, if you select the Use Class Indicator Dictionary option on the root descriptor's Inheritance tab, you must specify the indicator values for all subclasses.
You selected the Use Factory option on the descriptor's Instantiation Policy tab, but did not specify the Factory Class, Factory Method, or Instantiation Method fields.
You selected the Use Method option on the descriptor's Instantiation Policy tab, but did not specify the field.
The class indicator field (as defined on the Inheritance tab) should not contain any writeable mappings.
If the class is not available to import:
.zip
or .jar
file. You cannot import compressed classes.
TopLink's class import utility did not start correctly. One of the classes includes a static initialization method which may cause the import utility to fail.
Ensure that your project's CLASSPATH points to the root folder of your package hierarchy. For example, to import the com.company.class
package in the C:\classes\com\company
directory, your project CLASSPATH should be C:\classes\
.
Ensure that you have properly indicated the directories that contain the domain class(es) to map on the project's General tab.
The CLASSPATH containing your JDBC drivers should still be on your system CLASSPATH. The TopLink Mapping Workbench CLASSPATH is meant for domain classes only.
You may also need to edit the CLASS.PATH
section of the MappingWorkbench.lax
file to include the appropriate files.
If the Mapping Workbench encounters problems communicating or logging into the database, you should:
.dll
files) required by the driver.
.zip
or .jar
) required by the driver.
TopLink checks each descriptor and mapping to ensure that you have properly defined the required settings.
If a descriptor contains a deficient mapping or property, the Mapping Workbench displays a yellow caution icon to the left of its icon. If you select the error, the Mapping Workbench displays the complete error message in the status bar.
Refer to the Oracle9iAS TopLink: Mapping Workbench Reference Guide for more information on working with descriptors.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|