uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

2.5.6 If a problem occurs in the JPA Application

This section describes the analysis procedure when a trouble occurs in an application using JPA.

This section describes an example of the model failure and the analysis procedure for the cause.

Note that the information, between each log output by Cosminexus JPA provider, is based on time, Thread ID/Process ID, and PersistenceUnit name. You can raise a log level and acquire the data, when you cannot specify the cause in the acquired log and the log is repeated.

Organization of this subsection
(1) Exception occurrence by user application
(2) Errors occurred in a performance screen
(3) Data used in troubleshooting

(1) Exception occurrence by user application

This point describes an analysis procedure implemented by a user when an exception occurs in a user application. The timing, when the exception occurs, might be when starting an application (including deploy) or when executing the application. This section describes the analysis procedure when an exception occurs in their respective timings.

Exception occurrence when starting an application

The analysis procedure when an exception occurs while starting an application is as follows:

  1. Checking message logs
    Reference the message output by a message log. See the message manual and confirm the handling procedure of the message ID that is output. Moreover, examine the countermeasures.
  2. Checking application definitions
    Review the contents of the definition information of annotation in the application, persistence.xml, settings of O/R mapping files based on the contents of the message log and check whether there is any problem in the setup contents. When the method of handling the message log involves contacting the maintenance personnel, and when the cause of situations, such as not having any problem in the application process is not revealed, contact maintenance personnel.
Exception occurred when executing an application

This point describes an analysis procedure when an exception occurs while executing an application.

  1. Checking message logs
    Check the event of a failure from the message output to a message log. For details on the messages, see the manual uCosminexus Application Server Messages.
  2. Checking exception logs

Specify the point where an exception has occurred from the stack trace output to the exception log. To find out the cause of the exception occurrence, check whether there is any problem in the process contents of the application. Modify the application if there is any problem in the process.

When the method of handling the message log involves contacting the maintenance personnel, and when the causes of situations, such as not having any problem in the application process are not revealed, contact maintenance personnel.

(2) Errors occurred in a performance screen

This point describes an analysis procedure when a performance related failure occurs. For example, certain processes require time. The performance related problem might occur when starting an application or when executing the application.

When you start an application, if any performance related problem occurs, contact maintenance personnel. When you execute the application, and if any performance related problem occurs, specify the location of the problem as per the following procedure:

  1. Checking PRF trace.
    Specify the location where the process takes time from the contents of a PRF trace. Specify whether the cause of a failure is in the user-implemented location or in the Cosminexus JPA Provider. Modify the application if there is any problem in the user-implemented location. When the processes in the internal process of Cosminexus JPA provider take time, contact maintenance personnel.
  2. Checking operation logs
    For checking the issued SQL, check operation logs.
    For example, you can reference the issued SQL and confirm whether it is relevant to the following case or not:
    • JOIN operation is executed repeatedly by reading the entity because JOINED is used in inheritance strategy.
    • The entity managed by collection is operated, and therefore, SELECT is generated for each element with extension.

For details on the operation log output to Cosminexus JPA provider, see Appendix C.1 Cosminexus JPA Provider operation log.

(3) Data used in troubleshooting

The following table shows the troubleshooting data and the acquisition source of the data that is required in the Cosminexus JPA Provider, when a failure occurs in the system.

Table 2-15 Troubleshootingdata and data acquisition source required in Cosminexus JPA Provider

Troubleshooting data Acquisition source File name of the data
Message log snapshot (primary) Message log
Exception log snapshot (primary) Exception information when an error occurs
Operation log of Cosminexus JPA Provider snapshot (primary) Operation log of CJPA
J2EE server definition information snapshot (primary)
  • Option definition file for J2EE server
  • User property file for J2EE server
  • Security policy file for J2EE server
Definition information of applications included in the operation directory of J2EE server persistence.xml snapshot (secondary)
  • Contents of EJB server operation directory
  • Contents of Web container operation directory
O/R mapping file
Property file of EJB, WAR
Connector property file of DB Connector snapshot (secondary) Contents of Web container operation directory
DB Connector log snapshot (primary) Operation log of the resource adaptor that is deployed and used as a J2EE resource adaptor
Trace based Performance Analysis snapshot (primary) PRF daemon and PRF command log
J2EE server thread dump Thread dump acquisition command
SQL trace of a database to be connected (However, only when the trace information is collected)
  • HiRDB
    SQL trace
See the manual HiRDB SQL Reference

  • For the Oracle
    Trace file that is acquired when setting sql_trace=true in SQL trace init.ora
See the manual of Oracle.