AJ07 abend and DFHCZ0358 ClassNotFoundException when running JHE1
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.
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:
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:
- 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
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
The correct CLASSPATH to enable the JVM to find this Java program is
omitting the package name.
CICS/TS CICS TS CICS Transaction Server