EJB Exception Factory Exceptions (10001 - 10069)
An EJB exception factory generates run-time exceptions that are raised if a container provider specific to a given application server encounters a problem during any stage of the life cycle of an EJB bean.
Format
EXCEPTION [TOPLINK – error code]: Exception name
EXCEPTION DESCRIPTION: Message
Example 13-10 EJB Exception Factory Exception
EXCEPTION [TOPLINK – 10008]: javax.ejb.CreateException
EXCEPTION DESCRIPTION: Cannot find bean.
-
10001: CREATE_EXCEPTION
-
Cause: The PersistenceManager
for the given application server failed to create and EJB bean (for example, a problem was encountered during the create process, such as a NullPointerException
).
-
Action: Check the exception contained in the javax.ejb.CreateException
for additional information.
-
10002: REMOVE_EXCEPTION
-
Cause: The PersistenceManager
for the given application server failed to remove an EJB bean (for example, a problem was encountered during the remove, such as a NullPointerException
).
-
Action: Check the exception contained in the javax.ejb.RemoveException
for additional information.
-
10003: EJB_EXCEPTION
-
Cause: An internal, unexpected exception was raised.
-
Action: See the exception message provided.
-
10004: FINDER_EXCEPTION1
-
Cause: An unexpected exception was encountered while executing the finder method.
-
Action: See the exception message provided.
-
10007: DUPLICATE_KEY_EXCEPTION
-
Cause: The PersistenceManager
for a given application server failed to create an EJB bean, because an EJB bean with the given primary key already exists.
-
Action: Verify the application logic to ensure the primary key is unique.
-
10008: OBJECT_NOT_FOUND_EXCEPTION
-
Cause: A scalar finder (one that returns a single object) was invoked on a home interface, and returned a null
value.
-
Action: Verify the application logic to ensure the desired EJB bean exists.
-
10009: OBJECT_NOT_FOUND_PKEY_EXCEPTION
-
Cause: A finder method using the primary key indicated, returned a null
value.
-
Action: Verify the application logic to ensure the desired EJB exists.
-
10010: CANNOT_CREATE_READ_ONLY
-
Cause: An attempt was made to create an entity marked as read-only using session().getProject().setDefaultReadOnlyClasses
(aVector
). You cannot create a read-only entity.
-
Action: Read-only entities should be read from the database (not created by the home interface). Adjust the application to read the required entities beforehand.
-
10011: CANNOT_REMOVE_READ_ONLY
-
Cause: An attempt was made to delete an entity marked as read-only using session().getProject().setDefaultReadOnlyClasses
(aVector
). You cannot delete a read-only entity.
-
Action: Determine whether or not the object should be read-only or not. If it should, do not try to remove it.
-
10014: ERROR_IN_NON_TX_COMMIT
-
Cause: The PersistenceManager
for a given application server failed to end a local transaction (made up of a non-synchronized, non-JTA UnitOfWork
) after a remove, create, business method, or home method invocation.
-
Action: See the exception message provided.
-
10021: ERROR_ASSIGNING_SEQUENCES
-
Cause: The PersistenceManager
for a given application server, whose shouldAssignSequenceNumbers
method returns true
, failed to assign a sequence number to an entity.
-
Action: See the exception message provided.
-
10022: LIFECYCLE_REMOTE_EXCEPTION
-
Cause: A java.rmi.RemoteException
was raised when an entity was activated, loaded, passivated, or stored.
-
Action: See the exception message provided.
-
10023: SEQUENCE_EXCEPTION
-
Cause: An exception was raised while handling a post-insert DescriptorEvent
preventing the specified entity from being assigned a primary key.
-
Action: See the exception message provided.
-
10025: INTERNAL_ERROR_ACCESSING_CTX
-
Cause: Internal error.
-
Action: Contact Oracle Support Services if required.
-
10026: INTERNAL_ERROR_FINDING_GENSUBCLASS
-
Cause: Internal error.
-
Action: Contact Oracle Support Services.
-
10027: INTERNAL_ERROR_INITIALIZING_CTX
-
Cause: Internal error.
-
Action: Contact Oracle Support Services.
-
10028: INTERNAL_ERROR_INVALID_MAPPING
-
Cause: The registerOrMergeAttribute
method of the SessionAccessor, called from within an EJB setter method, failed to obtain a DatabaseMapping
for the given attribute from the PersistenceManager
.
-
Action: Verify that the given attribute belongs to the EJB class and if it does, verify that a mapping exists for it.
-
10029: INTERNAL_ERROR_ACCESSING_PK
-
Cause: Failed to wrap an EJB bean for return to the application because the attempt to extract the primary key from the bean failed.
-
Action: See the exception message provided.
-
10030: INTERNAL_ERROR_ACCESSING_PKFIELD
-
Cause: Failed to initialize primary key fields due to java.lang.NoSuchFieldException
.
-
Action: See the exception message provided.
-
10031: INTERNAL_ERROR_PREPARING_BEAN_INVOKE
-
Cause: One of the following failed with an exception other than javax.ejb.ObjectNotFoundException
: a conforming find using the same query as a find by primary key; an Oracle Containers for J2EE startCall
method invocation for a BUSINESS_METHOD operation; or a WebLogic preInvoke
method invocation.
-
Action: See the exception message provided
-
10032: FINDER_NOT_IMPLEMENTED
-
Cause: Associated finder method has no implementation.
-
Action: Provide an implementation for the finder method.
-
10033: FINDER_FINDBYPK_NULLPK
-
Cause: A find by primary key was called with a null
primary key value.
-
Action: Ensure the primary key is not null
when the finder method is invoked
-
10034: REMOVE_NULLPK_EXCEPTION
-
Cause: A find by primary key was called with a null
primary key value.
-
Action: Ensure the primary key is not null
when the finder method is invoked.
-
10036: ERROR_DURING_CODE_GEN
-
Cause: The PersistenceManager
for a given application server failed to generate a bean subclass.
-
Action: See the exception message provided.
-
10037: ERROR_EXECUTING_EJB_SELECT
-
Cause: An EJB select failed with an exception other than javax.ejb.ObjectNotFoundException
.
-
Action: See the exception message provided.
-
10038: ERROR_EXECUTING_EJB_HOME
-
Cause: The invocation of a home interface method (excluding finder or create methods) failed.
-
Action: See the exception message provided.
-
10040: NO_ACTIVE_TRANSACTION
-
Cause: A create or remove EJB failed because the PersistenceManager
does not have a transaction.
-
Action: Ensure your application has a transaction available. This may be a configuration problem related to your ejb-jar.xml
file or an application logic problem in your client code.
-
10043: FINDER_RESULTS_ALREADY_WRAPPED
-
Cause: The results of a finder query could not be wrapped because they were already wrapped.
-
Action: If a redirect query is used, be sure to call the setShouldUseWrapperPolicy(false)
method first.
-
10045: LOCAL_WRAPPER_MISSING
-
Cause: Error resolving the local interface.
-
Action: Double-check your local interface configuration.
-
10046: REMOTE_WRAPPER_MISSING
-
Cause: Error resolving the remote interface.
-
Action: Please double-check your remote interface configuration.
-
10047: CREATE_NULLPK_EXCEPTION
-
Cause: The PersistenceManager
for a given application server failed to create a bean because the primary key was not defined.
-
Action: Make sure the primary key is defined properly, either in the application logic or through the sequence number configuration.
-
10049: INVALID_COLLECTION_PARAMETER_TYPE
-
Cause: Exception [EJB - {0}]: The argument is not of the correct type for the relationship. See section 10.3.6 of the EJB 2.1 specification.
-
Action: Check the parameter type to ensure that it is of the correct type for this collection.
-
10051: INVALID_TRANSACTION_STATE
-
Cause: Exception [EJB - {0}]: An attempt was made to access a Collection
or Iterator
outside a transaction or in one other than the one in which it was acquired. See section 10.3.8 of the EJB 2.1 specification.
-
Action: Check the CMR collection to determine whether it is being accessed in the same transaction.
-
10052: NO_SUCH_OBJECT_EXCEPTION
-
Cause: Exception [EJB - {0}]: Cannot find bean of type with primary key for remote method invocation.
-
Action: The exception will be raised if the finder
method returns a null
result during remote method invocation.Ensure that the bean has already existed before lookup.
-
10053: NO_SUCH_OBJECT_LOCAL_EXCEPTION
-
Cause: Exception [EJB - {0}]: Cannot find bean of type with primary key for local method invocation.
-
Action: This exception will be raised if the finder method returns a null
result during local method invocation. Ensure that the bean already exists before lookup.
-
10054: INTERNAL_ERROR_ACCESSING_BEAN
-
Cause: Exception [EJB - {0}]: An internal error has occurred while accessing the bean.
-
Action: An internal exception occurred during create bean instance. Check the internal exception.
-
10055: ERROR_CASCADING_DELETE
-
Cause: Exception [EJB - {0}]: An error has occurred while cascading the delete from the bean to the relationship.
-
Action: An error occurred while performing cascade-delete of private owned objects. Check the underlying exception.
-
10056: ERROR_REL_MAINTENANCE
-
Cause: Exception [EJB - {0}]: An error has occurred while performing relationship maintenance for the bean with the relationship.
-
Action: Check the private-owned (cascade-delete) relationship in the domain object and also the underlying exception.
-
10057: MULTIPLE_RESULTS_FOR_SINGLE_FINDER
-
Cause: Exception [EJB - {0}]: Multiple results were found while executing the single object finder for the bean.
-
Action: Check if the query is passed properly and also the underlying TopLink query exception.
-
10058: CANNOT_UPDATE_READ_ONLY
-
Cause: Exception [EJB - {0}]: Unable to invoke method on bean because this bean is read only.
-
Action: Check the bean descriptor to see if the read-only flag was specified.
-
10059: CANNOT_MODIFY_ONEXONE_COLLECTIONSETTERS
-
Cause: Exception [EJB - {0}]: Unable to invoke method on bean because the target bean is read only. Either the target bean's object model (in the case of a bidirectional relationship) or the database table would not be modified by this operation.
-
Action: Check the target bean descriptor for the 1:1 relationship in the domain object, to see if the read-only flag was specified.
-
10060: CANNOT_MODIFY_RELATIONSHIP_COLLECTION_SOURCE
-
Cause: Exception [EJB - {0}]: Unable to invoke method on collection in bean because the source bean is read only.
-
Action: Check the source bean descriptor for the 1:M and M:M relationship in the domain object, to see if the read-only flag was specified.
-
10061: CANNOT_MODIFY_RELATIONSHIP_COLLECTION_TARGET
-
Cause: Exception [EJB - {0}]: Unable to invoke method on collection in bean because the target bean is read only. Either the target bean's object model (in the case of a bidirectional relationship) or the database table will not be modified by this operation.
-
Action: Check the bidirectional target bean descriptor to see if the read-only flag was specified.
-
10062: UNABLE_TO_RETRIEVE_UNDERLYING_DATA
-
Cause: Exception [EJB - {0}]: Unable to retrieve underlying data for object primary keys. The transaction must be restarted and objects refreshed.
-
Action: The underlying object is garbage collected and removed from the cache. Restart the transaction and refresh all objects.
-
10063: UNKNOWN_COLLECTION_CLASS
-
Cause: Exception [EJB - {0}]: Unknown collection type passed to container policy.
-
Action: Ensure that the correct collection type is used.
-
10064: MODIFYING_RELATIONSHIPS_NEEDS_TX
-
Cause: Exception [EJB - {0}]: Any changes to fields must be performed within a transaction.
-
Action: Ensure that any changes are performed within a transaction.
-
10065: REL_MAINT_ADD_ERORR
-
Cause: Exception [EJB - {0}]: An error occurred while adding an object to a collection.
-
Action: An error occurred during relationship maintenance for the add
method. Check the underlying exception.
-
10066: REL_MAINT_REMOVE_ERORR
-
Cause: Exception [EJB - {0}]: An error occurred while removing an object from a collection.
-
Action: An error occurred during relationship maintenance for the remove
method. Check the underlying exception.
-
10067: REL_MAINT_ERORR
-
Cause: Exception [EJB - {0}]: An error occurred while performing relationship maintenance for a field.
-
Action: An error occurred on relationship maintenance for the cmr
field. Check the underlying exception.
-
10068: MUST_USE_MANAGED_DS
-
Cause: Exception [EJB - {0}]: An error occurred with the data source. TopLink CMP
requires use of a <managed-data-source
>. A <native-data-source
> cannot be used.
-
Action: Check the data-sources.xml
file in OC4J. TopLink CMP
requires the use of a <managed-data-source
>
-
10069: ERROR_GETTING_FROM_JNDI
-
Cause: Exception [EJB - {0}]: Failed lookup of object under JNDI name.
-
Action: Check the JNDI name and also the underlying javax.naming.NamingException
.