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 8.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 8.1`.`

- Development Exceptions

- Deployment 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:

  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, 7.0), (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0).

  Action: In the `<WebLogic InstallDir>``/weblogic81/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.

Missing CMP entry in Persistence File
  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:` `ejbc couldn't invoke compiler`

  Action: In the `<WebLogic InstallDir>``/weblogic81/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:

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

  `ERROR:` `ejbc couldn't invoke compiler`

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

Wrong WebLogic Version
  Cause: You are trying to compile your EJB JAR file using BEA WebLogic Server 7.0. The exception message returned is:

  `ERROR: ejbc found errors while processing the descriptor for std_cmp20-singlebean.jar:``ERROR: ejbc found errors` `while processing 'META-INF/weblogic-ejb-jar.xml': The public id, "-//BEA Systems, Inc.//DTD WebLogic 8.1.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"``"-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN"``ERROR` `ejbc found errors`

  Action: Compile using BEA WebLogic Server 8.1.

## Deployment 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:

  E`rror Deployer BEA-149201 Failed to complete the deployment task with ID 0 for the application _appsdir_cmp20-singlebean_ear. weblogic.management.ApplicationException: Exception:weblogic.management.ApplicationException: prepare failed for cmp20-singlebean.jar` `Module: cmp20-singlebean.jar Error: Exception preparing module: EJBModule(cmp20-singlebean.jar,status=NEW)``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, 7.0), (WebLogic_CMP_RDBMS, 6.0), (WebLogic_CMP_RDBMS, 5.1.0)`

  Action: In the `<WebLogic InstallDir>``/``weblogic81/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:

  `Error Deployer BEA-149201 Failed to complete the deployment task with ID 2 for the application _appsdir_cmp20-relationships_ear.``weblogic.management.ApplicationException: Exception:weblogic.management.ApplicationException: prepare failed for cmp20-relationships.jar` `Module: cmp20-relationships.jar Error: Exception preparing module: EJBModule(cmp20-relationships.jar,status=NEW)` `Unable to deploy EJB:.\TopLink_Demos\stage\_appsdir_cmp20-relationships_ear\cmp20-relationships.jar from cmp20-relationships.jar:` `[EJB:011004]Error occurred 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:212)``at weblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:114)`

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