|
Oracle® Application Server TopLink Application Developer's Guide
10g Release 2 (10.1.2) Part No. B15901-01 |
|
![]() Previous |
![]() Next |
This section discusses some of the general troubleshooting issues surrounding entity bean configuration and deployment. It lists many of the common exceptions and error messages that you may run across when attempting to deploy and persist entity beans using OracleAS TopLink.
If you encounter any problems installing OracleAS TopLink, using OracleAS TopLink Mapping Workbench, or require more information on any runtime exceptions that are generated by OracleAS TopLink, consult the appropriate documentation.
If you experience trouble generating the JARs for deployment,
Ensure that all environment entries (classpath, and so on) are configured properly.
Identify which step of the build is failing (copying, compiling, running EJB compiler, and so on.)
Running the Enterprise JavaBean (EJB) compiler utility involves several processes, such as compiling, code-generation, EJB compliance verification, compiling RMI stubs by running rmic, and so on. If an error occurs during the running of the EJB compiler utility, try to determine which stage may be causing the failure.
For more information about the EJB compiler, see the server documentation.
The following are some of the most common errors that are encountered when you deploy to a BEA WebLogic applications server.
For more information about specific versions, see
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.WlsCMPDeployerERROR: ejbc found errors
toplink.jar file is not properly set on your classpath.
ORACLE_HOME>/toplink/jlib/toplink.jar file is specified on your system classpath.
Error Deploying Application
[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.DeploymentExceptionEXCEPTION DESCRIPTION: No OracleAS TopLink project was specified for this bean. atoracle.toplink.ejb.DeploymentException.noPro jectSpecified(DeploymentException.java:132) at oracle.toplink.internal.ejb.cmp.ProjectDeployment.readProject(ProjectDeployment.java:378)
toplink-ejb-jar.xml.
toplink-ejb-jar.xml file for either the project-xml or project-class.
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.DeploymentExceptionEXCEPTION DESCRIPTION: An error occurred while setting up the project: [java.io.FileNotFoundException: Account.xml]INTERNAL EXCEPTION: java.io.FileNotFoundException: Account.xmlatoracle.toplink.ejb.DeploymentException.errorCreatingProject(Unknown Source)
toplink-ejb-jar.xml file, and the 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> ...
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)
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.
toplink.jar file is not properly set on your classpath.
<ORACLE_HOME>/toplink/jlib/toplink.jar file is 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...
toplink-ejb-jar.xml file, and the location of the OracleAS 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)
toplink-ejb-jar.xml file is referring to a local DTD file using a file name or location that is incorrect.
Cannot Startup Connection Pool ejbPool
Cannot startup connection pool "ejbPool" weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: ...
The driver is not on the classpath.
The user name 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 file (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. You can find them under the wlserver6.1 directory, at the same level as the config directory.
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.
This section contains some of the exceptions and errors that can be encountered when running the IBM WebSphere Server, along with their possible causes and recommended solutions.
Class Not Found Exceptions
toplink.jar and antlr.jar are copied into the <WebSphere install>\lib\app directory.
oracle.toplink.exceptions.DatabaseException
[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.
ejbPassivate.
ejbPassivate clears out the bean.
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>
Exception [7066]
oracle.toplink.exceptions.ValidationException: Cannot create or remove beans unless a JTS transaction is present, bean=<bean>
Exception [7068]
oracle.toplink.exceptions.ValidationException: The project class <projectclass> was not found for the <toplink_session_name> using default class loader.
Exception [7069]
oracle.toplink.exceptions.ValidationException: An exception occured looking up or invoking the project amendment method, <amendmentMethod> on the class <amendmentClass>;
Exception [7070]
oracle.toplink.exceptions.ValidationException: A toplink.properties resource bundle must be located on the classpath in an OracleAS TopLink directory.
toplink.properties file cannot be found.
toplink.properties file is on the classpath.
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.
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.
toplink-ejb-jar.xml file was not found.
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>].
toplink-ejb-jar.xml file cannot be found.
This section lists some of the common exceptions and errors that can occur at runtime when using the OracleAS TopLink CMP for IBM WebSphere Application Server.
Exception [6026]
oracle.toplink.exceptions: Query is not defined
This following section lists common exceptions and errors that may occur when running the OracleAS TopLink for IBM WebSphere Deploy Tool.
Class Not Found Exceptions
|
Note: The Deploy Tool calls external IBM classes to generate deployed code. Any exceptions that are thrown from these classes is described onSystem.out. Check the Tracing button to view the most detailed information possible.
|
Following are a few of the most common errors you may encounter when deploying JAR files with OracleAS TopLink and BEA WebLogic 6.1.
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
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted or a BEA WebLogic Service Pack was applied.
<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
Error while loading persistence resource TopLink_CMP_Descriptor.xml Make sure that the persistence type is in your classpath.
toplink.jar file is not properly set in your classpath.
<ORACLE_HOME>/toplink/jlib/toplink.jar file.
Wrong BEA WebLogic Version
C:\<ORACLE_HOME>\toplink\examples\weblogic\wls61\ examples\ejb\cmp20\singlebean\Account.java:10: cannot resolve symbolsymbol : class EJBLocalObjectlocation: interface examples.ejb.cmp20.singlebean.Accountpublic interface Account extends EJBLocalObject {
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).
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted, or a BEA WebLogic Service Pack was applied.
<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
<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.atweblogic.ejb20.persistence.InstalledPersistence.initialize(InstalledPersistence.java:214)atweblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:113)
toplink.jar file is not properly set in your classpath.
<ORACLE_HOME>/toplink/jlib/toplink.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.AbstractMethodErroratweblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:807)atweblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1234)atweblogic.ejb20.deployer.Deployer.deploy(Deployer.java:947)atweblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
persistence-version meant for BEA WebLogic 7.0.
persistence-version of 4.0.
Cannot Startup Datasource
EXCEPTION [TOPLINK-7060] (TopLink (WLS CMP)-X.X):oracle.toplink.exceptions.ValidationExceptionEXCEPTION DESCRIPTION: Cannot acquire datasource [jdbc/ejbNonJTSDataSource].INTERNAL EXCEPTION: javax.naming.NameNotFoundException: Unable to resolve jdbc.ejbNonJTSDataSource Resolved: '' Unresolved:'jdbc' ; remaining name 'ejbNonJTSDataSource'
Wrong WebLogic Version
<DATE and TIME> <Error> <Management> <Error parsing XML descriptor for application TopLink_Domain:Name=ejb20_cmp_account, Type=Applicationweblogic.xml.process.ProcessorFactoryException: Could not locate processor for public id = "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"atweblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:181)atweblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:164)
Following are a few of the most common errors you may encounter when deploying JAR files with OracleAS TopLink and BEA WebLogic 7.0.
Missing Persistence Type
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
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted, or a BEA WebLogic Service Pack was applied.
<WebLogic InstallDir>/weblogic700/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 Persistence Type
ERROR: atweblogic.ejb20.persistence.InstalledPersistence.initialize(InstalledPersistence.java:214)atweblogic.ejb20.persistence.InstalledPersistence.getInstalledType(InstalledPersistence.java:113)atweblogic.ejb20.deployer.MBeanDeploymentInfoImpl.getPersistenceType(MBeanDeploymentInfoImpl.java:584
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted, or a BEA WebLogic Service Pack was applied.
<WebLogic InstallDir>/weblogic700/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.
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
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)
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted or a BEA WebLogic Service Pack was applied.
<WebLogic InstallDir>/weblogic7.0/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
java.lang.NullPointerExceptionatweblogic.ejb20.deployer.EJBDeployer.deactivate(EJBDeployer.java:1513)atweblogic.ejb20.deployer.EJBDeployer.undeploy(EJBDeployer.java:301)atweblogic.ejb20.deployer.Deployer.deploy(Deployer.java:875)atweblogic.j2ee.EJBComponent.deploy(EJBComponent.java:70)
toplink.jar file is not properly set in your classpath.
<ORACLE_HOME>/toplink/jlib/toplink.jar file.
Cannot Startup Datasource
EXCEPTION [TOPLINK-7060] (TopLink (WLS CMP) - X.X.X): oracle.toplink.exceptions.ValidationExceptionEXCEPTION DESCRIPTION: Cannot acquire datasource [jdbc/ejbNonJTSDataSource].INTERNAL EXCEPTION: javax.naming.NameNotFoundException: Unable to resolve jdbc.ejbNonJTSDataSource Resolved: '' Unresolved:'jdbc' ; remaining name 'ejbNonJTSDataSource'
Following are a few of the most common errors you may encounter when deploying JAR files with OracleAS TopLink and BEA WebLogic 8.1.
Missing Persistence Type
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).
ERROR: ejbc couldn't invoke compiler
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted, or a BEA WebLogic Service Pack was applied.
<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
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
toplink.jar file is not properly set in your classpath.
<ORACLE_HOME>/toplink/jlib/toplink.jar file.
Wrong WebLogic Version
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"ERRORejbc found errors
Missing Persistence Type
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.jarModule: 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)
persistence.install file for OracleAS TopLink CMP. This may occur if the OracleAS TopLink installation was interrupted or a BEA WebLogic Service Pack was applied.
<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
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.jarModule: 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)