EJBDEPLOY relationships – troubleshooting tips

Use this information to troubleshoot information for EJBDEPLOY problems.

The converter that is defined for the primary key is not invoked on its foreign key value

The mapping for primary key fields to database columns may use a converter to transform the key values. If a container-managed persistence (CMP) bean uses a converter to map its primary key, and that bean has a relationship where the bean at the other end holds a foreign key, the mapping for the foreign key will not use the converter.

The following errors might occur, indicating that the converter defined for the primary key is not invoked on its foreign key value. During the run of the ejbDeploy command , you receive the following message:
No type mapping defined for Java datatype1 to Database datatype2
During run time, the application does not find the CMP bean at the other end of the relationship.

To work around this limitation, define your own foreign key in the database table, and create a mapping that uses the same converter as defined for the primary key on the enterprise beans at the other end of its relationship.

Limitation when you use the EJBDeploy command with Java 8

[8.5.5.14 or later]The EJBDeploy tool does not support Java™ 8 in Version 8.5.5.8 and earlier of the application server. For Version 8.5.5.9 and later of the application server, you have the following options when you deploy EJB applications that are Version 2.1 or earlier:
  • For Version 8.5.5.9 through Version 8.5.5.13 of the application server, Java 8 support is enabled by installing the PI73197 interim fix.
  • For Version 8.5.5.14 and later versions of the application server, Java 8 support is enabled by default.

[8.5.5.14 or later]If you need Java 8 but you cannot install the PI73197 interim fix or Version 8.5.5.14, you have four options when you deploy EJB applications:

  • If the application is not modified and the generated deployment code is running on Java 6 or Java 7, regeneration of the deployment code is not required. You can deploy existing applications on an application server that is running Java 8.
  • If the EJB interfaces in the application are modified, you must prepare the application for deployment by using the EJBDeploy command. In this situation, run the EJBDeploy command with Java 6 or Java 7 before you deploy the application.

    Running the EJBDeploy command in this situation has no behavioral changes for the application or other impact on the application.

    1. Compile the EJB application with Java 6 or Java 7.
    2. Configure the application server with Java 6 or Java 7 by using the managesdk command.
    3. Run the EJBDeploy command on the application.
    4. Deploy the generated artifacts from the previous step onto the application server that is configured with Java 8.
  • If a strict requirement exists to use Java 8 for compilation or if the application needs to use new features of Java 8, you can upgrade to Version 9 of the application server. V9 supports Java 8 exclusively. The EJBDeploy command is also supported on Java 8.
  • If you do not want to upgrade to Version 9 of the application server, you must convert the application to EJB 3.0 or later. The EJBDeploy command is only required for container-managed persistence (CMP), bean-managed persistence (BPM), and session beans that follow EJB 2.1 or earlier versions of the specification. Applications that use EJB 3.0 or later do not need to run the EJBDeploy command.