Skip Headers

Oracle9iAS TopLink Troubleshooting Guide
Release 2 (9.0.3)

Part Number B10068-01
Go To Core Documentation
Core
Go To Platform Documentation
Platform
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

3
Mapping Workbench

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.

Error Messages

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.

1-1 mappings for EJB 2.0 CMP descriptors must use ValueHolder indirection.

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.

1-M and M-M mappings for EJB 2.0 CMP descriptors must use transparent indirection.

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.

A field/method pair is incomplete in the [mapping name] mapping.

You created a transformation mapping, but did not specify a complete Object > Field Method for each database field on the mapping's General tab.

A key pair has not been completely specified for a reference.

You must specify a foreign key reference for the database table. Use the database table's Reference tab to add a key pair.

A locking policy is specified, but the lock field is not specified.

You selected the Optimistic Locking field on the Locking tab, but did not specify the Field.

Aggregate fields are not specified.

For aggregate mappings, each Field Description on the Fields tab must contain a unique Field.

Aggregate mapping fields must be unique.

For aggregate mappings, each Field Description on the Fields tab must contain a unique Field.

An aggregate shared by multiple source descriptors cannot have one-to-many or many-to-many mappings.

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.

An ejb-jar.xml file needs to be specified.

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.

Attribute is typed as a ValueHolderInterface but the mapping does not use Value Holder Indirection.

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.

Attribute is typed as a ValueHolderInterface but the mapping does not use Indirection.

For one-to-one and transformation mappings, if the class attribute is of type ValueHolderInterface, you must use indirection for the mapping.

Classes cannot reference an aggregate target with one-to-one, one-to-many, or many-to-many mappings.

You cannot select an aggregate descriptor as the Reference Descriptor for a one-to-one, one-to-many, or many-to-many mapping.

EJB Class information is not compatible with project persistence type.

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).

If the mapping uses indirection, then the attribute must be a ValueHolderInterface.

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.

Mapping references write lock field, but is not read-only.

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.

Mapping uses Indirection but its associated attribute is not a ValueHolderInterface.

If you select the Use Indirection option for a one-to-one mapping with transparent indirection, the associated class attribute must be ValueHolderInterface.

Mapping uses Value Holder Indirection but its associated attribute is not a 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.

Mappings for EJB 2.0 CMP descriptors which use Value Holder Indirection must not use method accessing.

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.

Method accessors have not been selected.

You selected Use Method Accessing for a mapping, but did not select a Get and Set method on the mapping's General tab.

More than one writable many-to-many mapping cannot use the same relation table.

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.

Multi-table reference should be defined from the base table [table name] to the derived table.

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.

No attribute is associated with the mapping named [mapping name].

The specified mapping does not have an associated class attribute. Either refresh the class or remove the mapping.

No class in inheritance tree is marked as root.

The inheritance hierarchy must contain one root descriptor. Select the Is Root Descriptor option on the Inheritance tab.

No class indicator field is selected for this root class.

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.

No collection type is selected.

You must select a collection type on the mapping's Collection tab.

No database field is selected.

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.

No database type is selected.

For type conversion and object type mappings, you must select a Database Type on the mapping's General properties tab.

No direct field is specified.

For direct collection mappings, you must select a Target Table and Direct Field that the direct collection specifies.

No field/method pairs defined for the [mapping name] mapping.

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.

No indicator field is selected.

You created a variable one-to-one mapping, but did not specify a database field in which to store indicator values.

No indicator values are specified.

You created a variable one-to-one mapping, but did not specify indicator values for each object type.

No method specified for transforming a database row into this attribute.

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.

No null value type has been selected

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.

No object type is selected.

You created an object type mapping, but did not select an Object Type on the mapping's General tab.

No object-type mappings have been specified.

For object-type mappings, you must specify at least one mapping (Database Value and Object Value) on the mapping's General tab.

No primary key(s) specified in [table name] table.

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.

Not all query key associations have foreign key fields specified.

You must specify a foreign key field for each query key association on the Query Key Assocations tab for variable one-one mapping.

No query key associations have been defined.

You created a variable one-to-one mapping, but did not define a key pair on the mapping's Query Key Association tab.

No reference descriptor is selected.

You must select a Reference Descriptor for each relationship mapping on the mapping's General tab.

No relation table is selected.

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.

No sequence field name is selected.

If you select Use Sequencing on a descriptor's Descriptor Info tab, you must also specify a Name, Table, and Field.

No sequence name is selected.

If you select Use Sequencing on a descriptor's Descriptor Info tab, you must also specify a Name, Table, and Field.

No source reference is selected.

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).

No table reference is selected.

You must select (or create) a table reference for each relationship mapping on the mapping's Table Reference tab.

No target reference is selected.

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).

Object values do not match the specified attribute or object type.

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.

One or more field types have not been specified.

You must specify the Type for each database field on the Field tab.

One of the descriptors in this package is incomplete.

One (or more) of the descriptors in a package contains errors. The Mapping Workbench places an error icon Error icon. beside the incorrect package. Expand the package to display its descriptors.

One of the packages is incomplete.

One (or more) of the packages in your project contains errors. The Mapping Workbench places an error icon Error icon. beside the incorrect project. Expand the project to display its packages.

One of the tables is incomplete.

One (or more) of the database tables in your project contains errors. The Mapping Workbench places an error icon Error icon. beside the incorrect table. Expand the database object to display its tables.

Primary keys do not match across associated tables and no reference(s) specified in multi-table policy info.

Primary key field names must match across associated tables, or references must be defined from the primary table to each secondary table.

Primary keys(s) do not match parent's primary key(s).

In an inheritance hierarchy, the child's primary key(s) must match the root's primary key(s)

[descriptor name] references [reference descriptor name] which is not active.

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.

Root class does not include an indicator mapping for this descriptor.

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.

Some mappings are incomplete.

One (or more) of the attributes of a descriptor contains mapping errors. The Mapping Workbench places an error icon Error icon. beside the incorrect attribute(s). Expand the descriptor to display its mappings.

The Collection class is a Map, but the key method is not selected.

You created a direct collection type mapping, but did not specify the key method.

The inheritance hierarchy originating in this descriptor cannot contain both aggregate and non-aggregate child descriptors.

Aggregate and class descriptors cannot be in the same inheritance hierarchy.

The [access method type] method for this mapping's method accessing field is no longer visible to this descriptor.

You changed the class hierarchy within the project, causing the method access type (get or set) to no longer be visible to the class.

The method specified for the copy policy on this descriptor is no longer a visible member of this class.

You changed the class hierarchy within the project, causing the copy policy to no longer be visible to the class.

The database is incomplete.

The databases in a project contains errors. The Mapping Workbench places an error icon Error icon. beside the database. Expand the database to display its tables.

The event policy's [method type] method is no longer a visible member of this descriptor's associated class.

You changed the class hierarchy within the project, causing the method to no longer be visible to the class.

The following fields have multiple writable mappings: [field name].

Multiple mappings cannot write to the save database field. Each database field must have a single, writeable mapping.

The following Query Keys do not have associated database fields:

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.

The following primary key fields have no writable mappings: [field name].

Each primary key field must have a writeable mapping. Ensure that the primary key field mappings are not read only.

The following primary key fields are unmapped: [field name].

Each primary key field must have a writeable mapping.

The method specified for the copy policy on this descriptor is no longer a visible member of this class.

You changed the class hierarchy within the project, causing the copy policy to no longer be visible to the class.

The method specified for the inheritance policy's class extraction method on this descriptor is no longer a visible member of this class.

You changed the class hierarchy within the project, causing the inheritance policy to no longer be visible to the class.

The multi-table reference should not be defined on the database.

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.

The parent and children of an aggregate descriptor must also be aggregates.

If an aggregate descriptor is in an inheritance policy hierarchy, all descriptors in the hierarchy must be aggregates.

The reference [table reference] does not have any field associations.

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.

The reference must have at least one field association.

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.

The selected parent descriptor for this descriptor's inheritance policy does not have an associated inheritance policy.

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.

The source reference does not contain any field associations.

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.

The source reference must be specified.

You created a many-to-many mapping, but did not define a source table reference on the mapping's Source tab.

The target reference does not contain any field associations

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.

The target reference must be specified.

You created a many-to-many mapping, but did not define a target table reference on the mapping's Target tab.

There is no database associated with the query key [query key name].

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.

This class is a subclass of a final class.

If you select the Final option on descriptor's Class Info, Class tab for a class, the class cannot contain subclasses.

This root class has no class indicator mappings for its hierarchy.

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.


Note:

TopLink displays a list of each subclass and indicator value if you have identified the subclasses' parent descriptor.


"Use factory" is specified for the Instantiation policy, but all required info is not specified.

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.

"Use method" is selected for the Instantiation policy, but no method is selected.

You selected the Use Method option on the descriptor's Instantiation Policy tab, but did not specify the field.

Writable mappings defined for the class indicator field [field name].

The class indicator field (as defined on the Inheritance tab) should not contain any writeable mappings.

Classpath Issues

The Mapping Workbench does not display the class(es) to import.

If the class is not available to import:

The Mapping Workbench generates an exception error when importing 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\.

The Mapping Workbench fails to import the class but does not generate an exception error.

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.

Database Connections

If the Mapping Workbench encounters problems communicating or logging into the database, you should:

Troubleshooting Descriptors

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.

Figure 3-1 Sample Deficient Mapping

Text description of desmaper.gif follows.

Text description of the illustration desmaper.gif

Refer to the Oracle9iAS TopLink: Mapping Workbench Reference Guide for more information on working with descriptors.


Go to previous page Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Core Documentation
Core
Go To Platform Documentation
Platform
Go To Table Of Contents
Contents
Go To Index
Index