Skip Headers

Oracle9iAS TopLink Troubleshooting Guide
Release 2 (9.0.3)

Part Number B10068-01
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

5
Entity Deployment

This section discusses some of the general troubleshooting issues surrounding entity bean configuration and deployment, and lists many of the common exceptions and error messages that you may run across when attempting to deploy and persist entity beans using the Oracle9iAS TopLink Foundation Library.

If you encounter any problems installing TopLink, using the Mapping Workbench, or require more information on any runtime exceptions generated by TopLink, consult the appropriate documentation.

Generating Deployment JARs

If you experience trouble generating the JARs for deployment,

Running the EJB compiler utility involves several processes (compiling, code-generation, EJB compliance verification, compiling RMI stubs by running rmic). If an error occurs during the running of the EJB compiler utility, try to determine which stage may be causing the failure. Refer to the application server documentation for more information.

Common BEA WebLogic Deployment Exceptions

Following are some of the most common errors encountered when deploying to a BEA WebLogic applications server. Refer to "Common BEA WebLogic 6.1 Exceptions" and "Common WebLogic 7.0 Exceptions" for version-specific information.

Assertion Error

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not load class 'oracle.toplink.internal.ejb.cmp.wls.WlsCMPDeployer': java.lang.ClassNotFoundException: oracle.toplink.internal.ejb.cmp.wls.WlsCMPDeployer

ERROR: ejbc found errors

Action: This error occurs if the tl_wlsx.jar file is not properly set on your classpath. The tl_wlsx.jar should be located in the <INSTALL_DIR>/wls_cmp folder and should be specified on your system classpath.

Error Deploying Application

Cause: A DeploymentException has occurred.

Action: Refer to the specific error code. The error code appears in the square brackets in the exception message, such as [TopLink-8001]). These errors may be refer to errors in the specification of the project location reading in the properties file or validation errors due to improper mappings.

Exception 8001

<Error> <J2EE> <Error deploying application Account:

Unable to deploy EJB: AccountBean from Account.jar:

LOCAL EXCEPTION STACK:

EXCEPTION [TOPLINK-8001] (TopLink (WLS CMP) - X.X.X): oracle.toplink.ejb.DeploymentException

EXCEPTION DESCRIPTION: No TopLink project was specified for this bean.

oracle.toplink.ejb.DeploymentException.noPro jectSpecified(DeploymentException.java:132) at oracle.toplink.internal.ejb.cmp.ProjectDeployment.readProject(ProjectDeployment.java:378)

Action: This error can occur if the location of the TopLink Project file for the bean is not properly specified. Please double check the file name as it is specified in the toplink-ejb-jar.xml.xml file, and the actual location of the project file on the file-system.

Exception 8016

<Error> <J2EE> <Error deploying application Account:

Unable to deploy EJB: AccountBean from Account.jar:

LOCAL EXCEPTION STACK:

EXCEPTION [TOPLINK-8016] (TopLink (WLS CMP) - X.X.X): oracle.toplink.ejb.DeploymentException

EXCEPTION DESCRIPTION: An error occurred while setting up the project: [java.io.FileNotFoundException: Account.xml]

INTERNAL EXCEPTION: java.io.FileNotFoundException: Account.xml

oracle.toplink.ejb.DeploymentException.errorCreatingProject(Unknown Source)

Action: This error can occur if the location of the TopLink Project file for the bean is not properly specified. Please double check the file name as it is specified in the toplink-ejb-jar.xml.xml file, and the actual location of the project file on the file-system.

Cannot Startup Connection Pool

<Error> <JDBC> <Cannot startup connection pool "ejbPool" weblogic.common.ResourceException: Cannot load driver class: org.hsqldb.jdbcDriver>

...

Action: An error has occurred in setting up the connection pool. Check the nested SQL exception to determine the cause of the error. Typical problems include:

  • The driver is not on the classpath.

  • The user or password is incorrect.

  • The database server url or driver name is not properly specified.

Please consult the BEA WebLogic documentation and your JDBC Driver documentation for help on the specific error raised by BEA WebLogic.

Error Message

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not create an instance of class 'null': java.lang.NullPointerException

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:120)

at weblogic.ejb20.persistence.PersistenceType. loadClass(PersistenceType.java:309)

Action: This problem occurs if using the GA version of BEA WebLogic Server 6.0. Service Pack 1 (SP1) of BEA WebLogic Server 6.0 is required to use TopLink CMP for BEA WebLogic. You must upgrade to at least SP1.

EJBC Found Errors

ERROR: ejbc found errors

Error from ejbc: Error while loading persistence resource TopLink_CMP_Descriptor.xml Make sure that the persistence type is in your classpath.

Cause: This error occurs if the tl_wlsx.jar file is not properly set on your CLASSPATH.

Action: The tl_wlsx.jar should be located in the <INSTALL_DIR>/wls_cmp/lib directory, and should be specified on your system CLASSPATH.

EJB Deployment Exception

weblogic.ejb20.EJBDeploymentException: Error Deploying CMP EJB:; nested exception is: weblogic.ejb20.cmp.rdbms.RDBMSException: An error occurred setting up the project:

EXCEPTION [TOPLINK-13000] (vX.X [TOPLink for WebLogic X.X] JDK1.2): oracle.toplink.xml.XMLDataStoreException

EXCEPTION DESCRIPTION: File not found...

Action: This error occurs if the location of the TopLink Project file for the bean is not properly specified. Please double check the file name as it is specified in the toplink-ejb-jar.xml file, and the actual location of the TopLink project file on the file system.

Deploying EJB Component

Error deploying EJB Component: ... weblogic.ejb20.EJBDeploymentException: Exception in EJB Deployment; nested exception is:

Error while deploying bean..., File ... Not Found at weblogic.ejb20.persistence.PersistenceType.setup Deployer(PersistenceType.java:273)

Action: A typical cause of this error is that the toplink-ejb-jar.xml file is referring to a local DTD file using a file name or location that is incorrect. Please verify that all XML files refer to valid DTD files and locations.

Cannot Startup Connection Pool ejbPool

Cannot startup connection pool "ejbPool" weblogic.common.ResourceException:

Could not create pool connection. The DBMS driver exception was:

...

Action: An error has occurred in setting up the connection pool. Check the nested SQL exception to determine the cause of the error. Typical problems include:

  • The driver is not on the CLASSPATH.

  • The username or password is incorrect.

  • The database server URL or driver name is not properly specified.

Please consult the BEA WebLogic documentation and your JDBC driver documentation for help on the specific error raised by BEA WebLogic.

Other Errors

Occasionally, changes made to the server's configuration (config.xml) do not appear to be applied when the server is restarted. If this occurs, try removing the temp directories created by BEA WebLogic. These can be found under the wlserver6.1 directory, at the same level as the config folder.

Problems on IBM WebSphere Server Startup or IBM WebSphere Bean Deployment

This section lists some of the common exceptions and errors that can occur when deploying beans in IBM WebSphere Application Server.

Please consult the IBM WebSphere Application Server documentation for more information on deploying beans.

When the IBM WebSphere Server is started, it attempts to deploy the jar files that are specified for deployment within the application server.

Errors that occur when the server is started are usually configuration problems that involve CLASSPATH issues, environment variable configuration, and database login configuration. Review the IBM WebSphere Server documentation on starting the server, and TopLink for Java Foundation Library's Installing, Configuring and Testing.

Some of the exceptions and errors that can be encountered when running the IBM WebSphere Server are listed in this section, along with their possible causes and recommended solutions.

Class Not Found Exceptions

Cause: The class not found is not included on the WebSphere application extensions classpath or in the EJB or WAR module.

Action: Ensure that all required classes are included in the correct location. Refer to the "Setting classpaths" information in the IBM WebSphere InfoCenter for detailed information on classpath locations.

Cause: The required TopLink JARs have not been copied into the application extensions classpath.

Action: Ensure that toplink.jar, tl_wasx.jar, antlr.jar are copied into the <WebSphere install>\lib\app directory. For running the examples, hsqldb.jar and hsql_ds.jar must also be copied into the <WebSphere install>\lib\app directory.

oracle.toplink.exceptions.DatabaseException

Cause: A TopLink Exception has occurred.

Action: Refer to "Runtime and Development Exceptions" and look up the error code that is observed (the error code should be displayed in square brackets, such as [TopLink-1016]). Errors observed here may be errors in reading in the properties file, or validation errors due to improper mappings.

Exception [6066]

oracle.toplink.exceptions.QueryException: The object <Object> of class <class> with identity hashcode <hashcode> is not from this unit of work object space but the parent session's. The object was never registered in this unit of work, but read from the parent session and related to an object registered in the unit of work. Ensure that you are correctly registering your objects. If you are still having problems, you can use the UnitOfWork.validateObjectSpace() method to help debug where the error occurred. Please see the manual and FAQ for more information.

Cause: A bean was created outside of a transaction and then a second was created either in or out of a transaction.

Action: Ensure that all creates are done with in the context of a transaction.

Cause: The bean was not cleared out during ejbPassivate.

Action: Ensure that the ejbPassivate clears out the bean.

Cause: A bean-to-object relationships is not privately owned.

Action: Ensure that bean-to-object relationships are privately owned.

Exception [7064]

oracle.toplink.exceptions.ValidationException: Exception occured in reflective EJB bean primary key extraction, please ensure your primary key object is defined correctly: key = 301, bean = <beanName>

Cause: An incorrect primary key object is being used with a bean.

Action: Ensure that you are using the correct primary key object for a bean.

Exception [7066]

oracle.toplink.exceptions.ValidationException: Cannot create or remove beans unless a JTS transaction is present, bean=<bean>

Cause: An attempt was made to create or remove a been outside of a transaction.

Action: Ensure that all removing and creating of beans is done within a transaction.

Exception [7068]

oracle.toplink.exceptions.ValidationException: The project class <projectclass> was not found for the <toplink_session_name> using default class loader.

Cause: The project class specified in the TOPLink.properties file for the session specified on the toplink_session_name environment variable can not be found.

Action: Check that the project class given in the exception is on the WebSphere dependent classpath.

Exception [7069]

oracle.toplink.exceptions.ValidationException: An exception occured looking up or invoking the project amendment method, <amendmentMethod> on the class <amendmentClass>;

Cause: An amendment method was called but can not be found.

Action: Check that the required amendment method exists on the class specified.

Exception [7070]

oracle.toplink.exceptions.ValidationException: A TOPLink.properties resource bundle must be located on the classpath in a TOPLink directory.

Cause: The TOPLink.properties file can not be found.

Action: Make sure that the location of the TOPLink.properties files is on the classpath. If the exception is within VisualAge the TOPLink.properties file must be in the project resources for the TopLink project.

Exception [7079]

EXCEPTION DESCRIPTION: The descriptor for [<bean class>] was not found in the session [<session name>]. Check the project being used for this session.

Cause: The descriptor listed was not found in the session specified on the deployment descriptor.

Action: Check that the project specified in the toplink-ejb-jar.xml file is the desired project. Also check that the project includes a descriptor for the missing bean class.

Exception [7101]

No "meta-inf/toplink-ejb-jar.xml" could be found in your classpath. The CMP session could not be read in from file.

Cause: The toplink-ejb-jar.xml file was not found.

Action: Make sure that the toplink-ejb-jar.xml file is located in the deployed ejb jar file under the meta-inf directory.

Exception [9002]

EXCEPTION [TOPLINK-9002] (TopLink - X.X.X): oracle.toplink.exceptions.SessionLoaderExceptionEXCEPTION DESCRIPTION: Unable to load Project class [<project class>].

Cause: The project class specified for the session in the toplink-ejb-jar.xml file cannot be found.

Action: Check that the project class has been included in the deployed jar with the entity beans.

Problems Occurring at Runtime Using TopLink for WebSphere Foundation Library

This section lists some of the common exceptions and errors that can occur at runtime when using the TopLink CMP for IBM WebSphere Application Server.

Exception [6026]

oracle.toplink.exceptions: Query is not defined

Cause: A required named query does not exist.

Action: Implement the named query. The stacktrace of the exception will contain the finder that failed.

Common WebSphere Exceptions

This section lists common exceptions and errors that may occur when running the TopLink for IBM WebSphere Foundation Library Deploy Tool.

Class Not Found Exceptions

Cause: The class specified was not found; it is not included on the deploy tool classpath or the system classpath.

Action: Ensure that all required classes are included on the correct classpath. Refer to the IBM WebSphere Getting Started for detailed information regarding classpath setup.


Note:

The Deploy Tool calls external IBM classes to generate deployed code. Any exceptions thrown from these classes will be described on System.out. Check the Tracing button to view the most detailed information possible.


Common BEA WebLogic 6.1 Exceptions

Following are a few of the most common errors you may encounter when deploying .jars with TopLink and BEA WebLogic 6.1.

Development Exceptions

Missing Persistence Type

ERROR: Error from ejbc: Persistence type 'TopLink_CMP_2_0' with version 'X.X which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0).

ERROR: ejbc found errors

Cause: There is no entry in the persistence.install file for TopLink CMP. This may occur if to TopLink installation was interrupted or a BEA WebLogic service pack was applied.

Action: In the <WebLogic InstallDir>/wlserver6.1/lib/persistence directory, edit the persistence.install file to add a new line TopLink_CMP_Descriptor.xml or replace your existing persistence.install file with the version of the file in the <INSTALL_DIR>/wls_cmp folder.

Error Loading Persistence Resource

Error while loading persistence resource TopLink_CMP_Descriptor.xml Make sure that the persistence type is in your classpath.

Cause: The tl_wlsx.jar file is not properly set in your classpath.

Action: Ensure that the classpath includes the <INSTALL_DIR>/wls_cmp/core/lib/tl_wlsx.jar file.

Wrong BEA WebLogic Version

C:\<INSTALL_DIR>\Examples\wls61\ examples\ejb\cmp20\singlebean\Account.java:10: cannot resolve symbol

symbol  : class EJBLocalObject

location: interface examples.ejb.cmp20.singlebean.Account

public interface Account extends EJBLocalObject {

Cause: You are trying to compile using BEA WebLogic 6.0.

Action: Compile using BEA WebLogic 6.1.

Deployment/runtime Exceptions

Missing Persistence Type

Persistence type 'TopLink_CMP_2_0' with version 'X.X which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0).

Cause: There is no entry in the persistence.install file for TopLink CMP. This may occur if to TopLink installation was interrupted or a BEA WebLogic service pack was applied.

Action: In the <WebLogic InstallDir>/wlserver6.1/lib/persistence directory, edit the persistence.install file to add a new line TopLink_CMP_Descriptor.xml, or replace your existing persistence.install file with the version of the file in the <INSTALL_DIR>/wls_cmp folder.

Error Loading Persistence Resource

<DATE and TIME> <Error> <J2EE> <Error deploying application ejb20_cmp_order:

Unable to deploy EJB: C:\<INSTALL_DIR>\examples\wls61\server\.\config\TopLink_Domain\applications\.wlnotdelete\wlap64280\ejb20_cmp_order.jar from ejb20_cmp_order.jar:

Error while loading persistence resource TopLink_CMP_Descriptor.xml Make sure that the persistence type is in your classpath.

weblogic.ejb20.persistence.InstalledPersistence.initialize(InstalledPersistence.java:214)

weblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:113)

Cause: The tl_wlsx.jar file is not properly set in your classpath.

Action: Ensure that the classpath includes the <INSTALL_DIR>/wls_cmp/lib/tl_wlsx.jar file.

Wrong Persistence Version

DATE and TIME> <Error> <J2EE> <Error deploying application ejb20_cmp_account:

Unable to deploy EJB: Account from ejb20_cmp_account.jar:

java.lang.AbstractMethodError

weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:807)

weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1234)

weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:947)

weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)

Cause: You may be using a <persistence-version> meant for BEA WebLogic 7.0.

Action: Use a <persistence-version> of 4.0.

Cannot Startup Data Source

EXCEPTION [TOPLINK-7060] (TopLink (WLS CMP)-X.X):oracle.toplink.exceptions.ValidationException

EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/ejbNonJTSDataSource].

INTERNAL EXCEPTION: javax.naming.NameNotFoundException: Unable to resolve jdbc.ejbNonJTSDataSource Resolved: '' Unresolved:'jdbc' ; remaining name 'ejbNonJTSDataSource'

Cause: An error has occurred in setting up the datasource.

Action: Check the nested SQL exception to determine the cause of the error. See "Error code: 7060" for more information. Consult the BEA WebLogic documentation and your JDBC Driver documentation for help on the specific error raised by WebLogic.

Wrong WebLogic Version

<DATE and TIME> <Error> <Management> <Error parsing XML descriptor for application TopLink_Domain:Name=ejb20_cmp_account, Type=Application

weblogic.xml.process.ProcessorFactoryException: Could not locate processor for public id = "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"

weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:181)

weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:164)

Cause: You are trying to compile using WebLogic 6.0.

Action: Compile using WebLogic 6.1.

Common WebLogic 7.0 Exceptions

Following are a few of the most common errors you may encounter when deploying .jars with TopLink and WebLogic 7.0.

Development-time Exceptions:

Missing Persistence Type

ERROR: Error from ejbc: Persistence type 'TopLink_CMP_2_0' with version 'X.0 which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0), (WebLogic_CMP_RDBMS, 7.0).

Persistence type 'TopLink_CMP_2_0' with version 'X.0 which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0), (WebLogic_CMP_RDBMS, 7.0)

ERROR: ejbc found errors

Cause: There is no entry in the persistence.install file for TopLink CMP. This may occur if to TopLink installation was interrupted or a WebLogic service pack was applied.

Action: In the <WebLogic InstallDir>/weblogic700b/lib/persistence directory, edit the persistence.install file to add a new line TopLink_CMP_Descriptor.xml or replace your existing persistence.install file with the version of the file in the <INSTALL_DIR>/wls/cmp folder.

Error Loading Persistence Resource

ERROR: Error from ejbc: Error while loading persistence resource TopLink_CMP_Descriptor.xml

Make sure that the persistence type is in your classpath.

ERROR: ejbc found errors

or

ERROR: at

weblogic.ejb20.persistence.InstalledPersistence.initialize(InstalledPersistence.java:214)

weblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:113)

weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.getPersistenceType(MBeanDeploymentInfoImpl.java:584

Cause: The tl_wlsx.jar file is not properly set in your classpath.

Action: Ensure that the classpath includes the <ISNTALL_DIR>/wls_cmp/lib/tl_wlsx.jar file.

Wrong WebLogic Version

ERROR: Error processing 'META-INF/weblogic-ejb-jar.xml': The public id, "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN", specified in the XML document is invalid. Use one of the following valid public ids:

"-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"

"-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"

ERROR: ejbc found errors

Cause: You are trying to compile using WebLogic 6.1.

Action: Compile using WebLogic 7.0.

Deployment/runtime Exceptions:

Missing Persistence Type

Error from ejbc: Persistence type 'TopLink_CMP_2_0' with version 'X.0 which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0), (WebLogic_CMP_RDBMS, 7.0).

Persistence type 'TopLink_CMP_2_0' with version 'X.0 which is referenced in bean 'Account' is not installed. The installed persistence types are: (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0), (WebLogic_CMP_RDBMS, 7.0)

Cause: There is no entry in the persistence.install file for TopLink CMP. This may occur if to TopLink installation was interrupted or a WebLogic service pack was applied.

Action: In the <WebLogic InstallDir>/weblogic6.1/lib/persistence directory, edit the persistence.install file to add a new line TopLink_CMP_Descriptor.xml or replace your existing persistence.install file with the version of the file in the <INSTALL_DIR>/wls_cmp folder.

Error Loading Persistence Resource

java.lang.NullPointerException

at

weblogic.ejb20.deployer.EJBDeployer.deactivate(EJBDeployer.java:1513)

at

weblogic.ejb20.deployer.EJBDeployer.undeploy(EJBDeployer.java:301)

weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:875)

weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:70)

Cause: The tl_wlsx.jar file is not properly set in your classpath.

Action: Ensure that the classpath includes the <INSTALL_DIR>/wls_cmp/lib/tl_wlsx.jar file.

Cannot Startup Data Source

EXCEPTION [TOPLINK-7060] (TopLink (WLS CMP) - X.X.X): oracle.toplink.exceptions.ValidationException

EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/ejbNonJTSDataSource].

INTERNAL EXCEPTION: javax.naming.NameNotFoundException: Unable to resolve jdbc.ejbNonJTSDataSource Resolved: '' Unresolved:'jdbc' ; remaining name 'ejbNonJTSDataSource'

Cause: An error has occurred in setting up the datasource.

Action: Check the nested SQL exception to determine the cause of the error. See "Error code: 7060" for more information. Consult the BEA WebLogic documentation and your JDBC Driver documentation for help on the specific error raised by WebLogic.


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

All Rights Reserved.
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index