Hitachi

Hitachi Advanced Database Application Development Guide


7.7.2 Exception trace log

You can acquire an exception trace log as troubleshooting information. If a failure caused by an exception occurs in the JDBC driver, the cause of the failure is output to the exception trace log.

The following constitute the output contents:

When this function is used, information about JDBC's API methods that are called from an application program is stored in the JDBC driver memory. If an SQLException, BatchUpdateException, SQLClientInfoException, or UnSupportedOperationException occurs, the information stored in the memory is output to a file before the exception is thrown.

Organization of this subsection

(1) Methods to be acquired and setup for log acquisition

(a) Methods to be acquired in the exception trace log

The information to be acquired in the exception trace log is the calling and return of methods coded in the java.sql and javax.sql packages found in the API specifications of Java Platform Standard Edition 6.

Methods that satisfy the following condition are acquired:

Methods that only look up and return information found in objects or methods that only store information into objects, such as a getXXX method of the ResultSet object, a setXXX method of the PreparedStatement method, or the isClosed method of the Connection object, are not acquisition targets.

The following table lists the methods that are acquisition targets of the exception trace log. The table also shows the trace acquisition levels applicable to each method.

Table 7‒16: Methods that are acquisition targets of the exception trace log and their applicable trace acquisition levels

Class

Method

Trace acquisition levels

1

2

3

4

5#1

Connection

void close()

Y

Y

Y

Y

Y

void commit()

N

Y

Y

Y

Y

Statement createStatement()#2

Y

Y

Y

Y

Y

Statement createStatement(int resultSetType, int resultSetConcurrency)#3

Y

Y

Y

Y

Y

DatabaseMetaData getMetaData()

N

Y

Y

Y

Y

boolean isValid(int timeout)

N

Y

Y

Y

Y

PreparedStatement prepareStatement(String sql)#2

Y

Y

Y

Y

Y

PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)#3

Y

Y

Y

Y

Y

void rollback()#2

N

Y

Y

Y

Y

void setAutoCommit(boolean autoCommit)

N

Y

Y

Y

Y

DatabaseMetaData

boolean autoCommitFailureClosesAllResultSets()

N

Y

Y

Y

Y

ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)

N

Y

Y

Y

Y

ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)

N

Y

Y

Y

Y

ResultSet getCatalogs()

N

Y

Y

Y

Y

ResultSet getClientInfoProperties()

N

Y

Y

Y

Y

ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)

N

Y

Y

Y

Y

ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)

N

Y

Y

Y

Y

Connection getConnection()

N

Y

Y

Y

Y

ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable)

N

Y

Y

Y

Y

ResultSet getExportedKeys(String catalog, String schema, String table)

N

Y

Y

Y

Y

ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern)

N

Y

Y

Y

Y

ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)

N

Y

Y

Y

Y

ResultSet getImportedKeys(String catalog, String schema, String table)

N

Y

Y

Y

Y

ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)

N

Y

Y

Y

Y

ResultSet getPrimaryKeys(String catalog, String schema, String table)

N

Y

Y

Y

Y

ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)

N

Y

Y

Y

Y

ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern)

N

Y

Y

Y

Y

ResultSet getPseudoColumns(String catalog,String schemaPattern,String tableNamePattern,String columnNamePattern)

N

Y

Y

Y

Y

RowIdLifetime getRowIdLifetime()

N

Y

Y

Y

Y

ResultSet getSchemas()

N

Y

Y

Y

Y

ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern)

N

Y

Y

Y

Y

ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern)

N

Y

Y

Y

Y

ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)

N

Y

Y

Y

Y

ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)

N

Y

Y

Y

Y

ResultSet getTableTypes()

N

Y

Y

Y

Y

ResultSet getTypeInfo()

N

Y

Y

Y

Y

ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)

N

Y

Y

Y

Y

ResultSet getVersionColumns(String catalog, String schema, String table)

N

Y

Y

Y

Y

Driver

Connection connect(String url, Properties info)

Y

Y

Y

Y

Y

PreparedStatement

boolean execute()#2

N

Y

Y

Y

Y

ResultSet executeQuery()#2

N

Y

Y

Y

Y

int executeUpdate()#2

N

Y

Y

Y

Y

long executeLargeUpdate()#2

N

Y

Y

Y

Y

ResultSetMetaData getMetaData()

N

Y

Y

Y

Y

boolean execute(String sql)#3, #4

N

Y

Y

Y

Y

int[] executeBatch()#4

N

Y

Y

Y

Y

long[] executeLargeBatch()#4

N

Y

Y

Y

Y

ResultSet executeQuery(String sql)#3, #4

Y

Y

Y

Y

Y

int executeUpdate(String sql)#3, #4

Y

Y

Y

Y

Y

long executeLargeUpdate(String sql)#3, #4

Y

Y

Y

Y

Y

ParameterMetaData getParameterMetaData()

N

Y

Y

Y

Y

ResultSet

boolean absolute(int row)

N

Y

Y

Y

Y

void afterLast()

N

Y

Y

Y

Y

void beforeFirst()

N

Y

Y

Y

Y

void close()

N

Y

Y

Y

Y

boolean first()

N

Y

Y

Y

Y

ResultSetMetaData getMetaData()

N

Y

Y

Y

Y

int getHoldability()

N

Y

Y

Y

Y

Statement getStatement()

N

Y

Y

Y

Y

boolean isClosed()

N

Y

Y

Y

Y

boolean last()

N

Y

Y

Y

Y

boolean next()

N

Y

Y

Y

Y

boolean relative(int rows)

N

Y

Y

Y

Y

boolean isAfterLast()

N

Y

Y

Y

Y

boolean isBeforeFirst()

N

Y

Y

Y

Y

boolean isLast()

N

Y

Y

Y

Y

Statement

void cancel()

N

Y

Y

Y

Y

void close()

Y

Y

Y

Y

Y

boolean execute(String sql)

Y

Y

Y

Y

Y

int[] executeBatch()

N

Y

Y

Y

Y

long[] executeLargeBatch()

N

Y

Y

Y

Y

ResultSet executeQuery(String sql)

Y

Y

Y

Y

Y

int executeUpdate(String sql)

Y

Y

Y

Y

Y

long executeLargeUpdate(String sql)

Y

Y

Y

Y

Y

ResultSet getResultSet()

N

Y

Y

Y

Y

DataSource

getConnection()#2

Y

Y

Y

Y

Y

getConnection(String username, String password)#3

Y

Y

Y

Y

Y

ConnectionPoolDataSource

getPooledConnection()#2

Y

Y

Y

Y

Y

getPooledConnection(String username, String password)#3

Y

Y

Y

Y

Y

PooledConnection

close()

Y

Y

Y

Y

Y

getConnection()

Y

Y

Y

Y

Y

Legend:

Y: Exception trace log is acquired.

N: Exception trace log is not acquired.

#1

When the trace acquisition level is 5, an exception trace log that includes internal calls is acquired.

#2

method-name(1) is output as the method name.

#3

method-name(2) is output as the method name.

#4

This method overrides the method in the Statement class.

(b) Setup for acquisition of the exception trace log (setting properties)

You use system properties, user properties, or URL connection properties to set the file output destination for the exception trace log, the number of outputs to the file, the number of information items to be acquired in memory, and the trace acquisition level.

The following table lists and describes the items that are specified in properties.

Table 7‒17: Exception trace log items specified in properties

Item

Property

Description

Default value#

File output destination

adb_jdbc_exc_trc_out_path

Specify the absolute path of the directory to which the exception trace log is to be output. The exception trace log is output directly under the specified directory

Current directory

Number of outputs to the file

adb_jdbc_info_max

Specify the maximum number of information items to be output to one file. The value must be in the range from 1 to 50.

The actual maximum number of information items to be output to one file is number of outputs to the file × number of information items to be acquired in memory.

For the number of outputs to the file, each of the formats from Format 2 to Format 4 shown in (2) Exception trace log output formats counts as one output.

The information items are output to memory in the sequence they were stored.

If information items exceeding the maximum value are to be output to the file, the items are wrapped into a second file. The file names are as follows:

  • adbjdbcexception01.trc

  • adbjdbcexception02.trc

Note that the output destination file does not change between Format 1 and Format 2 shown in (2) Exception trace log output formats.

5

Number of information items to be acquired in memory

adb_jdbc_cache_info_max

Specify the maximum number of information items to be stored in memory. The value must be in the range from 500 to 10,000.

For the information acquired in memory, each method shown in Table 7‒16: Methods that are acquisition targets of the exception trace log and their applicable trace acquisition levels is counted as one item.

If the number of information items to be stored exceeds the maximum value, old information items are overwritten with new information items in chronological order.

1,000

Trace acquisition level

adb_jdbc_trc_out_lv

Specify a trace acquisition level. The value must be in the range from 0 to 5.

If you specify 5, all methods that are trace acquisition targets, including internally called methods, are acquired.

If you specify 0, an exception trace log is not acquired.

1

#

In an exception trace log that is acquired in the following cases, the system assumes that no value is specified for the property. In this case, the default value applies.

  • When an invalid value is specified in the properties and an SQLException is thrown at the time that a connection to the database is established.

  • When the Java Virtual Machine (JVM) denies the JDBC driver permission to exchange properties because of security manager reasons.

  • Before the initial connection of the Java Virtual Machine (JVM) is established.

(2) Exception trace log output formats

An exception trace log consists of the four formats show below.

Format 1: Header section
[AA....AA] Hitachi Advanced Data Binder JDBC Driver BB-CC
Format 2: Method execution history (start of a method's execution)
AAAAAAAAAAAAAAAAAAAAAAA BB....BB:[C][DD....DD]
                           ConnectionID(EE....EE) : SID(FF....FF)
                           GG....GG
Format 3: Method execution history (normal termination of a method)
AAAAAAAAAAAAAAAAAAAAAAA BB....BB:[C][DD....DD]
                           ConnectionID(EE....EE) : SID(FF....FF)
                           HH....HH
Format 4: Timing of output that occurred
AAAAAAAAAAAAAAAAAAAAAAA BB....BB:Exception:
II....II

Formats 2 and 3 are output in time sequence as many times as the number of methods that are executed.

(a) Explanation of variables in Format 1

AA....AA

Sequence number of the output information

The sequence number is incremented by 1 for each output (including failures caused by output errors). After the value reaches 2,147,483,647, the sequence returns to 0.

BB

JDBC driver's version number

CC

JDBC driver's revision number

(b) Explanation of variables in Formats 2, 3, and 4

AAAAAAAAAAAAAAAAAAAAAAA

Acquisition date and time of the exception trace log, in the following format:

YYYY/MM/DD hh:mm:ss.sss

YYYY: Year (Western calendar)

MM: Month

DD: Date

hh: Hour (24-hour clock)

mm: Minute

ss.sss: Second (includes 3 digits after the decimal point)

BB....BB:

Thread identification information for the target thread, in the following format:

Thread[aa....aa]@bb....bb
aa....aa:

Thread information, including the thread name, priority, and thread group name. The Java Virtual Machine (JVM) determines the format.

bb....bb:

Hash code of the object. The Java Virtual Machine (JVM) determines the format.

C

Call identification information for the method:

E:

The information is history information for when the method was started.

R:

The information is history information for when the method terminated normally.

DD....DD:

Object identifier and method name, in the following format:

aa....aa.bb....bb
aa....aa:

Object identifier (maximum of 32 characters). The Java Virtual Machine (JVM) determines the format.

bb....bb:

Method name

EE....EE:

Connection ID (maximum of four characters)

FF....FF:

Section ID (maximum of four characters)

GG....GG:

Method arguments, in the following format (this information is not output for methods without arguments):

aa....aa=bb....bb
aa....aa=bb....bb
        :
aa....aa=bb....bb
aa....aa:

Argument name

bb....bb:

Argument contents (maximum of 256 characters). For reference type values, the object determines the format.

One asterisk (*) is output to bb....bb for the password argument of the following methods:

  • getConnection(String username, String password) of the DataSource class

  • getPooledConnection(String username, String password) of the ConnectionPoolDataSource class

For the info argument in connect(String url,Properties info) of the Driver class, the value of the following property is replaced by one asterisk (*) and then output:

  • password

HH....HH

Return value of the method, in the format shown below. This item is not output for methods that do not have a return value. If the return value is a reference-type value, the Java Virtual Machine (JVM) determines the format.

Return=aa....aa
aa....aa:

Method's return value

II....II:

Troubleshooting information, in the following format:

ExceptionClass: aa....aa
ConnectionInformation: bb....bb
Message: cc....cc
ErrorCode: dd....dd
UpdateCounts: ee....ee, ..<omitted>.. ,ee....ee
ff....ff
aa....aa:

Execution class name of the exception object that was thrown

bb....bb:

Connection information for the exception object, in the format shown below. If no definitions are to be output, this variable is replaced by an asterisk (*) and then output.

yy.....yy (zz.....zz), ..<omitted>.., yy.....yy (zz.....zz)

yy.....yy: Type of connection information item:

  • host (HADB server's host name)

  • port (HADB server's port number)

  • user (authorization identifier)

  • sqlwaittime (HADB client's maximum response wait time (seconds))

zz.....zz: Contents of the connection information item. Note that the password part of user is not displayed.

cc....cc:

Message of the exception object

If there are multiple messages, each message is displayed, separated by an end-of-line code, after the message corresponding to SQLCODE. In this case, the message that is returned by the getMessage method of an exception object is also displayed as a character string separated by an end-of-line code.

dd....dd:

SQLCODE error code (maximum of 11 characters)

This item is output when the execution class of the thrown exception object is the following class or subclass:

  • SQLException

ee.....ee:

Number of update rows for each update statement in a batch update that was executed normally before this exception occurred (maximum of 11 characters).

This item is output when the execution class of the exception object is BatchUpdateException.

If the number of update rows cannot be obtained, an asterisk (*) is output.

ff.....ff:

Stack trace in which the exception-throwing method is set as the base point. The Java Virtual Machine (JVM) determines the format.

(3) Output example and analysis methodology

(a) Output example

[1] Hitachi Advanced Data Binder JDBC Driver VV-RR#
2011/07/06 23:07:09.129 Thread[main,5,main]@1259414:[E][AdbConnection@82c01f.createStatement(1)]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:09.160 Thread[main,5,main]@1259414:[R][AdbConnection@82c01f.createStatement(1)]
                        ConnectionID(1) : SID(0)
                        Return=com.hitachi.hadb.jdbc.AdbStatement@1e4cbc4
2011/07/06 23:07:09.160 Thread[main,5,main]@1259414:[E][AdbStatement@1e4cbc4.execute]
                        ConnectionID(1) : SID(0)
                        sql=DELETE FROM SEINO_TABLE
2011/07/06 23:07:14.285 Thread[main,5,main]@1259414:[E][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:14.301 Thread[main,5,main]@1259414:[R][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:14.301 Thread[main,5,main]@1259414:[R][AdbStatement@1e4cbc4.execute]
                        ConnectionID(1) : SID(1)
                        Return=false
2011/07/06 23:07:14.301 Thread[main,5,main]@1259414:[E][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        sql=INSERT INTO SEINO_TABLE VALUES(?, ?)
2011/07/06 23:07:14.348 Thread[main,5,main]@1259414:[R][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        Return=com.hitachi.hadb.jdbc.AdbPreparedStatement@15d56d5
2011/07/06 23:07:26.567 Thread[main,5,main]@1259414:[E][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:26.567 Thread[main,5,main]@1259414:[R][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:26.567 Thread[main,5,main]@1259414:[E][AdbStatement@1e4cbc4.executeQuery]
                        ConnectionID(1) : SID(0)
                        sql=SELECT * FROM SEINO_TABLE
2011/07/06 23:07:26.676 Thread[main,5,main]@1259414:[R][AdbStatement@1e4cbc4.executeQuery]
                        ConnectionID(1) : SID(1)
                        Return=com.hitachi.hadb.jdbc.AdbResultSet@3eca90
2011/07/06 23:07:28.332 Thread[main,5,main]@1259414:[E][AdbResultSet@3eca90.close]
                        ConnectionID(1) : SID(1)
2011/07/06 23:07:28.332 Thread[main,5,main]@1259414:[E][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:28.332 Thread[main,5,main]@1259414:[R][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:28.332 Thread[main,5,main]@1259414:[R][AdbResultSet@3eca90.close]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:28.332 Thread[Thread-0,5,main]@30090737:[E][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        sql=SELECT * FROM SEINO_TABLE
2011/07/06 23:07:28.332 Thread[Thread-0,5,main]@30090737:[R][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        Return=com.hitachi.hadb.jdbc.AdbPreparedStatement@2808b3
2011/07/06 23:07:28.348 Thread[Thread-1,5,main]@5462872:[E][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        sql=DELETE FROM SEINO_TABLE WHERE I1=?
2011/07/06 23:07:28.358 Thread[Thread-1,5,main]@5462872:[E][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:29.672 Thread[Thread-1,5,main]@5462872:[R][AdbConnection@82c01f.commit]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:30.098 Thread[Thread-1,5,main]@5462872:[R][AdbConnection@82c01f.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        Return=com.hitachi.hadb.jdbc.AdbPreparedStatement@922804
2011/07/06 23:07:30.332 Thread[Thread-2,5,main]@25253977:[E][AdbConnection@82c01f.rollback(1)]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:42.098 Thread[Thread-2,5,main]@25253977:[R][AdbConnection@82c01f.rollback(1)]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:42.098 Thread[Thread-2,5,main]@25253977:[E][AdbConnection@82c01f.close]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:42.098 Thread[Thread-2,5,main]@25253977:[R][AdbConnection@82c01f.close]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:42.535 Thread[Thread-1,5,main]@5462872:Exception:
ExceptionClass: SQLException
ConnectionInformation: *
Message: KFAA71206-E Processing cannot continue because the connection is already closed. [AdbPreparedStatement.setInt]
ErrorCode: -1020006
java.sql.SQLException: KFAA71206-E Processing cannot continue because the connection is already closed. [AdbPreparedStatement.setInt]
at com.hitachi.hadb.jdbc.JdbMakeException.generateSQLException(JdbMakeException.java:31)
at com.hitachi.hadb.jdbc.AdbStatement.generateClosedSQLException(AdbStatement.java:3005)
at com.hitachi.hadb.jdbc.AdbPreparedStatement.setInt(AdbPreparedStatement.java:1170)
at Exception1.run(ExceptionTraceSample.java:57)
[2] Hitachi Advanced Data Binder JDBC Driver VV-RR#
2011/07/06 23:07:25.723 Thread[Thread-3,5,main]@13249998:[E][AdbConnection@119cca4.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        sql=SELECT * FROM SEINO_TABLE
2011/07/06 23:07:25.770 Thread[Thread-4,5,main]@25839584:[E][AdbConnection@119cca4.rollback(1)]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:25.770 Thread[Thread-4,5,main]@25839584:[R][AdbConnection@119cca4.rollback(1)]
                        ConnectionID(1) : SID(0)
2011/07/06 23:07:25.770 Thread[Thread-5,5,main]@24431647:[E][AdbConnection@119cca4.prepareStatement(1)]
                        ConnectionID(1) : SID(0)
                        sql=SELECT ** FROM SEINO_TABLE
2011/07/06 23:07:25.863 Thread[Thread-5,5,main]@24431647:Exception:
ExceptionClass: SQLException
ConnectionInformation: user(ADBUSER01), sqlwaittime(0), host(dragon2), port(20249)
Message: KFAA30105-E Token "*"(non-reserved word), which is after token "*", is invalid.[AdbStatement.prepare]
ErrorCode: -105
java.sql.SQLException: KFAA30105-E  Token "*"(non-reserved word), which is after token "*", is invalid.[AdbStatement.prepare]
at com.hitachi.hadb.jdbc.JdbSection.prepare(JdbSection.java:1497)
at com.hitachi.hadb.jdbc.AdbStatement.prepare(AdbStatement.java:2834)
at com.hitachi.hadb.jdbc.AdbPreparedStatement.<init>(AdbPreparedStatement.java:109)
at com.hitachi.hadb.jdbc.AdbConnection.prepareStatement(AdbConnection.java:1041)
at Exception1.run(ExceptionTraceSample.java:64)
#

For VV-RR, the version of the JDBC driver is output.

(b) Analysis methodology

This subsection explains the analysis methodology for an exception trace log. You can use a text editor to view an exception trace log.

This analysis example analyzes the exception trace log shown in (a) Output example.

To analyze the exception trace log:

  1. From the sequentially numbered information, extract the exception to be investigated

  2. Categorize the information by using the Thread identification information, and separate the information by thread.

  3. Arrange the information in time sequence based on the acquisition times.

    The following table shows what the results look like.

    Table 7‒18: Example in which the exception trace log is arranged in time sequence

    Date and time

    Thread 1

    Thread 2

    Thread 3

    Thread 4

    Thread[main,5,main]@1259414

    Thread[Thread-0,5,main]@30090737

    Thread[Thread-1,5,main]@5462872

    Thread[Thread-2,5,main]@25253977

    2011/07/06

    23:07:09.129

    AdbConnection@82c01f.createStatement(1)

         

    2011/07/06

    23:07:09.160

    AdbStatement@1e4cbc4.execute

         

    2011/07/06

    23:07:14.285

    AdbConnection@82c01f.commit

         

    2011/07/06

    23:07:14.301

    AdbConnection@82c01f.prepareStatement(1)

         

    2011/07/06

    23:07:26.567

    AdbConnection@82c01f.commit

         

    2011/07/06

    23:07:26.567

    AdbConnection@82c01f.commit

         

    2011/07/06

    23:07:26.567

    AdbStatement@1e4cbc4.executeQuery

         

    2011/07/06

    23:07:28.332

    AdbResultSet@3eca90.close

    AdbConnection@82c01f.prepareStatement(1)

       

    2011/07/06

    23:07:28.332

    AdbConnection@82c01f.commit

         

    2011/07/06

    23:07:28.348

       

    AdbConnection@82c01f.prepareStatement(1)

     

    2011/07/06

    23:07:28.358

       

    AdbConnection@82c01f.commit

     

    2011/07/06

    23:07:30.332

         

    AdbConnection@82c01f.rollback(1)

    2011/07/06

    23:07:42.098

         

    AdbConnection@82c01f.close

    2011/07/06

    23:07:42.535

       

    SQLException occurred

    "KFAA71206-E Processing cannot continue because the connection is already closed."

     
  4. Check the nature of the exception error.

    The information indicates that an SQLException occurred in Thread 3 on July 6, 2011 at 23:07:42.535, and that a Statement or Connection object had already been closed.

  5. Check the operation of the object in the time sequence.

    Because the object ID of the Connection object in the next thread is the same, we know that four threads were being processed in the same connection.

    • Thread 1 at 2011/07/06 23:07:09.129

    • Thread 2 at 2011/07/06 23:07:28.332

    • Thread 3 at 2011/07/06 23:07:28.348

    • Thread 4 at 2011/07/06 23:07:30.332

  6. Search for the location of the cause of the error.

    Because we know that the four threads have the same connection, we can search for the locations where the Statement.close or Connection.close method was executed, and we learn that Thread 4 executed the Connection.close method on July 6, 2011 at 23:07:42.098. From this, we know that the reason for the SQLException that occurred in Thread 3 on July 6, 2011 at 23:07:42.535 was that Thread 4 executed the Connection.close method on July 6, 2011 at 23:07:42.098.

(4) Required memory size and file size

(a) Required memory size

The memory size required for acquiring an exception trace log is determined from the following formula:

Formula

↑360 × n ÷ 1,024↑ (kilobytes)

Explanation of variable

n: Number of information items to be acquired in memory (value of adb_jdbc_cache_info_max in the system properties, user properties, or URL connection properties)

(b) Required file size

The approximate file size required for acquiring an exception trace log is determined from the following formula:

Formula

↑180 × n × m ÷ 1,024↑ + 1 (kilobytes)

Explanation of variables

n: Number of information items to be acquired in memory (value of adb_jdbc_cache_info_max in the system properties, user properties, or URL connection properties)

m: Number of file output information items (value of adb_jdbc_info_max in the system properties, user properties, or URL connection properties)

(5) Notes

(a) First output after startup of the Java Virtual Machine (JVM)

The first exception trace log output to a file after the Java Virtual Machine (JVM) has started is the one output to the file with the oldest update date and time. If the date and time are the same for both files, the log is output to adbjdbcexception01.trc.

(b) Specification of the file output destination

If the same file output destination is specified when exception trace logs are being acquired from multiple processes, trace information for the different processes will be output to the same file. To acquire traces separately for each process, specify a different file output destination for each process.

The JDBC driver uses the facilities of the Java Virtual Machine (JVM) to create log files in the file system provided by the OS. Therefore, the following items depend on the Java Virtual Machine (JVM) and file system being used:

  • Prefix for the absolute pathname

  • Path delimiter character

  • Maximum number of characters for the output destination file (absolute path)

  • Size per file

(c) Error handling procedure

No information is output to the exception trace log when file creation or output fails. An error message is not returned to the application program and file output is not retried.

(d) Character encoding

The exception trace log is output using the default conversion character set of the Java Virtual Machine (JVM) that is being used.