AJ07 abend and DFHCZ0358 ClassNotFoundException when running JHE1

Technote (troubleshooting)


Problem(Abstract)

You receive an abend AJ07 ( abendAJ07 ) and message DFHCZ0358 reporting java.lang.ClassNotFoundException . This occurs when running CICS supplied JCICS sample transactions such as JHE1. It can also occur when running any CICS Java™ application.

Symptom

The CICS log contained the following:

CICS trace contained the following:



Cause

There is a problem with the CLASSPATH.

Resolving the problem

Do the following:

  • Ensure the directory names you specify on the CLASSPATH are spelled correctly.

  • If the directories are continued on more than one line, ensure that you follow the continuation Rules for coding JVM profiles and JVM properties files that are documented in the CICS TS V2.3 System Definition Guide:

    Continuation
    For JVM options or system properties, the value is delimited by the end of the line in the text file. If a system property or JVM option, such as a class path, that you are entering or editing is too long for an editor window, you can break the line to avoid scrolling. To continue on the next line, terminate the current line with the backslash and a blank (\ ) continuation characters. For example, the LIBPATH option in the CICS-supplied sample JVM profiles is coded as follows:

    LIBPATH=\
         /usr/lpp/cicsts/cicsts23/lib:\
         /usr/lpp/cicsts/cicsts23/ctg:\
         /usr/lpp/java141/J1.4/bin:\
         /usr/lpp/java141/J1.4/bin/classic

  • If your application program is using the Java package statement, ensure that the CLASSPATH does not contain the portion of the directory name that is the same as the package name. Include the package name in the JVMCLASS of the PROGRAM definition and the package statement in the Java program. The following example is documented in section Java standard options of the CICS System Definition Guide under CLASSPATH :

    For example, the source of the CICS HelloCICSWorld sample program begins with

        package examples.HelloWorld;


    In this case, the package name should be included in the class name in the CICS program resource definition; for example, as JVMCLASS(examples.HelloWorld.HelloCICSWorld).

    When you create the sample program using the supplied HelloCICSWorld.mak makefile, it is installed in the /examples/HelloWorld/ subdirectories. For example, if you build the samples in the default directories created when you installed CICS TS, the full path is


        /usr/lpp/cicsts/cicsts23/samples/dfjcics/examples/HelloWorld/

    The correct CLASSPATH to enable the JVM to find this Java program is


        CLASSPATH=/usr/lpp/cicsts/cicsts23/samples/dfjcics
     

    omitting the package name.

Related information

DFHCZ0358
Abend AJ07

Product Alias/Synonym

CICS/TS CICS TS CICS Transaction Server

Rate this page:

(0 users)Average rating

Document information


More support for:

CICS Transaction Server
Java

Software version:

2.3

Operating system(s):

z/OS

Reference #:

1054180

Modified date:

2004-10-20

Translate my page

Machine Translation

Content navigation