Skip Headers

Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Common BEA WebLogic Server 6.1 Exceptions

The following are a few of the most common exceptions you may encounter when deploying JAR files with TopLink and BEA WebLogic Server 6.1:

- Development Exceptions

- Deployment and Run Time Exceptions

## Development Exceptions

Missing Persistence Type
  Cause: There is no entry in the `persistence.install` file for TopLink CMP. This may occur if the TopLink installation was interrupted or a BEA WebLogic Server Service Pack was applied. The exception message returned is:

  `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`

  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 `<ORACLE_HOME>``/toplink/config` directory.

`` Error Loading Persistence Resource
  Cause: The `toplink.jar` file is not properly set in your classpath. The exception message returned is:

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

  Action: Ensure that the classpath includes the `<ORACLE_HOME>``/toplink/jlib/toplink.jar` file.

Wrong BEA WebLogic Version
  Cause: You are trying to compile your code using BEA WebLogic Server 6.0. The exception message returned is:

  `C:\``<ORACLE_HOME>``\toplink``\examples\weblogic\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 {`

  Action: Compile using BEA WebLogic Server 6.1.

## Deployment and Run Time Exceptions

Missing Persistence Type
  Cause: There is no entry in the `persistence.install` file for TopLink CMP. This may occur if the TopLink installation was interrupted, or a BEA WebLogic Server Service Pack was applied. The exception message returned is:

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

  Action: In the `<WebLogic InstallDir>``/wlserver6.1/lib/persistence` directory, edit the `persistence.install` file to add a new line: `TopLink_CMP_Descriptor.xml`. You can also replace your existing `persistence.install` file with the version of the file in the `<ORACLE_HOME>``/toplink/config` directory.

Error Loading Persistence Resource
  Cause: The `toplink.jar` file is not properly set in your classpath. The exception message returned is:

  `<``DATE and TIME``> <Error> <J2EE> <Error deploying application ejb20_cmp_order:``Unable to deploy EJB: C:\``<ORACLE_HOME>``\toplink\examples\weblogic\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.``at` `weblogic.ejb20.persistence.InstalledPersistence.initialize(InstalledPersistence.java:214)``at` `weblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:113)`

  Action: Ensure that the classpath includes the `<ORACLE_HOME>``/toplink/jlib/toplink.jar` file.

Wrong Persistence Version
  Cause: You may be using a `persistence-version` meant for BEA WebLogic Server 7.0. The exception message returned is:

  `DATE and TIME``> <Error> <J2EE> <Error deploying application ejb20_cmp_account:``Unable to deploy EJB: Account from ejb20_cmp_account.jar:``java.lang.AbstractMethodError` `at` `weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:807)``at` `weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1234)``at` `weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:947)``at` `weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)`

  Action: Use a `persistence-version` of 4.0.

Cannot Start Up Data Source
  Cause: An exception has occurred while setting up the data source. The exception message returned is:

  `EXCEPTION [TOPLINK-7060] (TopLink (WLS CMP)-X.X):``oracle.toplink``.exceptions.ValidationException` `EXCEPTION DESCRIPTION: Cannot acquire datasource [jdbc/ejbNonJTSDataSource].``INTERNAL EXCEPTION: javax.naming.NameNotFoundException: Unable to resolve jdbc.ejbNonJTSDataSource Resolved: '' Unresolved:'jdbc' ; remaining name 'ejbNonJTSDataSource'`

  Action: Check the nested SQL exception to determine the cause of the exception. For more information, see "7060: CANNOT_ACQUIRE_DATA_SOURCE". For more information on a specific exception raised by WebLogic, see the BEA WebLogic Server documentation and your JDBC driver documentation.

Wrong WebLogic Version
  Cause: You are trying to compile your code using BEA WebLogic Server 6.0. The exception message returned is:

  `<``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"``at` `weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:181)``at` `weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:164)`

  Action: Compile using BEA WebLogic Server 6.1.