First install! - Resolved

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
SHorein
Posts: 3
Joined: Wed Aug 02, 2006 4:20 pm

First install! - Resolved

Post by SHorein »

Hello,
I'm working with a developer that would like to see Tomcat work on our OS/390 2.10 system. Yes, I know, it's very old. I have Java 1.3, JZOS 1.2.2, both Jakarta 5.0.28 and 4.1.31, and Xerces 1.2.3. I can get through the SAMPLIB member RUN13 with no problems. When I try TC13, the job ends with RC 0, but with the following in the STDERR:

java.lang.reflect.InvocationTargetException:
java.lang.NoSuchMethodError:
javax.xml.parsers.SAXParser:
method getXMLReader()Lorg/xml
/sax/XMLReader; not found
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)

and in STDOUT:

CEE3627I The following messages pertain to the programmer default
run-time options.
CEE3611I The run-time option FILETAG was an invalid run-time option or
is not supported in this release of Language Environment.
JZOSVM13(N): Copyright (C) 2004 Dovetailed Technologies LLC. All rights
reserved.
JZOSVM13(N): JZOS Version 1.2.2
JZOSVM13(N): Java Virtual Machine created. Version information follows:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1)
Classic VM (build 1.3.1, J2RE 1.3.1 IBM OS/390 Persistent Reusable VM
build cm131s-20040117 (JIT enabled: jitc))
JZOSVM13(N): Invoking org.apache.catalina.startup.Bootstrap.main()
JZOSVM13(N): org.apache.catalina.startup.Bootstrap.main() completed.
JZOSVM - JVM completed with exit(0).

Here's JCL and STDENV input:

//JAVA EXEC PROC=EXJZOSVM,VERSION='13',
// JAVACLS='org.apache.catalina.startup.Bootstrap',
// ARGS='start'
//STEPLIB DD DISP=SHR,DSN=CEE.SCEERUN
// DD DISP=SHR,DSN=SYST.DTLLC.JZOS.V101.LOADLIB
//STDENV DD *
# This is a shell script which configures
# any environment variables for the Java JVM.
# Variables must be exported to be seen by the launcher.
. /etc/profile
export JZOS_HOME=/opt/dtllc/jzos
export JAVA_HOME=/usr/lpp/java/IBM/J1.3
export XERCES_HOME=/opt/xerces/xerces-1_2_3
#OMCAT_HOME=/opt/jakarta/jakarta-tomcat-4.1.31
TOMCAT_HOME=/opt/jakarta/jakarta-tomcat-5.0.28

export PATH=/bin:"${JAVA_HOME}"/bin:

LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
LIBPATH="$LIBPATH":"${JZOS_HOME}"
export LIBPATH="$LIBPATH":

CLASSPATH="${JAVA_HOME}/lib/tools.jar"
CLASSPATH="$CLASSPATH":"${TOMCAT_HOME}/bin/bootstrap.jar"
CLASSPATH="$CLASSPATH":"${JZOS_HOME}/jzos.jar"
CLASSPATH="$CLASSPATH":"${XERCES_HOME}/xerces.jar"
export CLASSPATH="$CLASSPATH":

# Set JZOS specific options
# Use this variable to specify encoding for DD STDOUT and STDERR
#export JZOS_OUTPUT_ENCODING=Cp1047
# Use this variable to prevent JZOS from handling MVS operator commands
#export JZOS_ENABLE_MVS_COMMANDS=false
# Use this variable to supply additional arguments to main
#export JZOS_MAIN_ARGS=""

# Configure JVM options
# Note that Tomcat requires default ASCII file.encoding
IJO="-Xms64m -Xmx128m"
IJO="$IJO -Djzos.home=${JZOS_HOME}"
IJO="$IJO -Dfile.encoding=ISO8859-1"
IJO="$IJO -Dcatalina.base=${TOMCAT_HOME}"
IJO="$IJO -Dcatalina.home=${TOMCAT_HOME}"
IJO="$IJO -Djava.io.tmpdir=${TOMCAT_HOME}/temp"
IJO="$IJO -Djava.endorsed.dirs="
IJO="${IJO}${TOMCAT_HOME}/common/endorsed"
export IBM_JAVA_OPTIONS="$IJO "

export JAVA_DUMP_HEAP=false
export JAVA_PROPAGATE=NO
export IBM_JAVA_ZOS_TDUMP=NO


As you can see, I added Xerces to try to get the XML parser to work, and backleveled tomcat to 4.1.31 at times, thinking the 5.x version being 'too new'. Any ideas other than 'Upgrade everything'? That solution will take place, but not in the time that I have.

Thanks for any insight!
Kind regards,
Steve Horein
Last edited by SHorein on Wed Aug 09, 2006 4:11 pm, edited 1 time in total.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Try this: take xerces.jar out of your CLASSPATH and instead copy it to $TOMCAT_HOME/common/lib.

5.0.28 should work fine with JDK 1.3, but if it still doesn't work, you might want to check to see if you have at "recent" maintenance for JDK 1.3 - at least the "1.3.1" level.

Also, if you have more classpath / class not found errors, you might want to add "-verbose:class,Xclassdep" to IBM_JAVA_OPTIONS, this will give you a classloader trace of sorts, which can sometimes be helpful.

Good Luck!
SHorein
Posts: 3
Joined: Wed Aug 02, 2006 4:20 pm

Post by SHorein »

dovetail wrote:Try this: take xerces.jar out of your CLASSPATH and instead copy it to $TOMCAT_HOME/common/lib.

5.0.28 should work fine with JDK 1.3, but if it still doesn't work, you might want to check to see if you have at "recent" maintenance for JDK 1.3 - at least the "1.3.1" level.

Also, if you have more classpath / class not found errors, you might want to add "-verbose:class,Xclassdep" to IBM_JAVA_OPTIONS, this will give you a classloader trace of sorts, which can sometimes be helpful.

Good Luck!
Thanks - I have tried what you suggested, including the classloader trace, which resulted in about 60 pages of output! Copying the Xerces jar to tomcat's /common/lib didn't seem to help; the same error occurs. I'm applying PTF UK13777, which should wrap up any maintenance I may have been missing. After that gets put on, I'll try it again!

Thanks again,
Steve Horein
SHorein
Posts: 3
Joined: Wed Aug 02, 2006 4:20 pm

Post by SHorein »

Situation resolved :D
Application of PTF UK13777 did the trick!
Thanks for your help,
Steve Horein
Post Reply