T:Z V6.0.18 Distribution/Start Up Questions

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
R_Parham
Posts: 5
Joined: Wed Jul 14, 2010 6:49 am
Location: Raleigh, NC

T:Z V6.0.18 Distribution/Start Up Questions

Post by R_Parham »

T:Z Current distribution questions reference start up.
I recently downloaded the T:Z 6.0.18 download and installed it in my z/OS V1.10 USS system. I followed all the install/start instructions provided to the "T" and have review the install/configuration several times. Here is what I have experienced so far.

I cannot get TOMCAT to start.

1) I attempted to start TOMCAT with JAVA V1.5 from IBM delivered /usr/lpp/java/J5.0. I receive the following LE message:
CEE3587S A call was made to a function in the AMODE 31 DLL libjvm.so from an AMODE 64 caller.
From entry point JzosVM::initializeVMArgs() at compile unit offset +0000000014004808 at entry offset +00000000000000B0 at
address 0000000014004808.

2) I changed to the IBM delivered JAVA 1.5_64 bit java and received the following:
JVMJZBL1001N JZOS batch Launcher Version: 2.3.0 2008-05-12
JVMJZBL1002N Copyright (C) IBM Corp. 2005. All rights reserved.
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pmz64devifx-20100511a (SR11 FP2 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 z/OS s390x-64 j9vmmz6423ifx-20100510 (JIT enabled)
J9VM - 20100509_57823_BHdSMr
JIT - 20091016_1845ifx7_r8
GC - 20091026_AA)
JVMJZBL1023N Invoking org.apache.catalina.startup.Bootstrap.main()...
JVMJZBL2008E Could not find or load class: org.apache.catalina.startup.Bootstrap
JVMJZBL2007E Stack trace follows:
java.lang.NoClassDefFoundError: org.apache.catalina.startup.Bootstrap
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap
.at java.net.URLClassLoader.findClass(URLClassLoader.java:497)
.at java.lang.ClassLoader.loadClass(ClassLoader.java:639)
.at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
.at java.lang.ClassLoader.loadClass(ClassLoader.java:605)
JVMJZBL1047W JZOS batch launcher completed with Java exception, return code=100

<Questions >
1) So it appears what is delivered in the package is 64 bit java?
2) I have installed and configured the package per the instructions and checked my work several times. Any idea on why my class path directives are not being used to find the classes?

Thanks for any assistance you can provide on this start up.
Regards, Ray
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

The package will work with either 31 bit or 64 bit java.

In the first case, you probably have a mismatch with your JZOS launcher version and the SDK version. Check your TCPROC, and ensure that:

1.) VERSION matches the SDK you wish to use: '50' -> J5.0 (31 bit), '56' -> J5.0 (64 bit), '60' -> J6.0 (31 bit) or '66' -> J6.0 (64 bit).

2.) JZOSLIB points to a PDSE containing the JZOS launcher load modules.

For the second problem, you probably are not pointing to the directory where Tomcat is installed. In TCENV, ensure that CATALINA_HOME and CATALINA_BASE point to the directory you set in TCHOME when you ran the INSTALL job (from the INSTJCL PDS).
R_Parham
Posts: 5
Joined: Wed Jul 14, 2010 6:49 am
Location: Raleigh, NC

Post by R_Parham »

I have made it a bit further but, now I have nothing to go on reference resolving the start up issue. It does attempt to start but then simply ends with a RC=0.
Here are the messages I receive in STDOUT:
-----------------------------------------------------
JVMJZBL1012I Java Virtual Machine created. Version information follows:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pmz64devifx-20100511a (SR11 FP2 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 z/OS s390x-64 j9vmmz6423ifx-20100510 (JIT enabled)
J9VM - 20100509_57823_BHdSMr
JIT - 20091016_1845ifx7_r8
GC - 20091026_AA)
JVMJZBL1027I Using output encoding: IBM-1047
JVMJZBL1016I MVS commands are ENABLED
JVMJZBL1023N Invoking org.apache.catalina.startup.Bootstrap.main()...
JVMJZBL1024N org.apache.catalina.startup.Bootstrap.main() completed.
JVMJZBL1014I Waiting for non-deamon Java threads to finish before exiting...
JVMJZBL2999I JZOS batch launcher elapsed time=8.830320 seconds, cpu time=2.2437440 seconds
JVMJZBL1021N JZOS batch launcher completed, return code=0

I suspect the failure is due to the 1st messages in the STDERR; which I donot know how to proceed to repair?

Here are portions of the messages I receive in STDERR:
I receive a fatalError, followed by WARNINGs:
------------------------------------------------------------------
Jul 21, 2010 11:35:17 AM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 7 column 2: The markup declarations contained or pointed to by the document type declaration must
be well-formed.
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
.at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
.
.
.
Jul 21, 2010 11:35:17 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml:
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
.at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
.at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
.at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
.
.
.
SEVERE: Parse Fatal Error at line 7 column 2: The markup declarations contained or pointed to by the document type declaration must
be well-formed.
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
.at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
.at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
.at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) WARNING: Catalina.start using conf/server.xml: .
.
.
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
.at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
.at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)


If more information is need to assist in diagnoising this please let me know. Thanks for any assistance you can provide. I am continuing to look at this as my time allows.
Regards, Ray
R_Parham
Posts: 5
Joined: Wed Jul 14, 2010 6:49 am
Location: Raleigh, NC

Post by R_Parham »

I believe my error may be in the "servvars" member.
What should this statement look like syntax wise?

<ENTITY httpPort "60030"/> <!-- Tomcat HTTP port, SY3 TOMCAT30 STC-->

I believe I have misformed the statement and this is what is causing my fatalError.

Tks, Ray
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

The XML ENTITY syntax is:

<!ENTITY httpPort "8080">

It looks like you modified more than the port number.

Please post your SERVVARS member here. We can take a look at what you've changed.
R_Parham
Posts: 5
Joined: Wed Jul 14, 2010 6:49 am
Location: Raleigh, NC

Post by R_Parham »

Ok - I have been thoroughly confused by the doc in that this set up. The config is not near as easy as the doc verbage leads you to believe, IMHO.

The server doc leads one to believe there is only a couple of parameters you must change in the servvars member to get started, when in fact it gets real messy when you don't have db2 (our case) or don't want to connect to db2.

For starters, I believe what I must do is comment out the ENTITY sslPort and ENTITY hostname or maybe I need the ENTITY hostname, but if so I do not know what to put there?

For db2 it appears commenting the lines in servvars is not at all adequate in that on start after commenting the db2 lines in the servvars, the servxml references replaceable parameters that are now not defined, causing the instance to not start.

So I guess what may work is to completely canabalize both members, servvars and servxml, to try to come up with an XML that will allow TOMCAT to start.

When you are a z/OS systems programmer and not at all familiar with XML syntax and format, and there is no documentation I can find on the Web or otherwise that describes a valid start up XML for tomcat, this gets really hard and time consuming for a novice.

I'll stay at it as time allows but the concept of having it up in an hour or two in our case is a bad joke, IMHO!
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Ron,

I'm sorry that your experience configuring T:Z is not going well.

In your previous post, it looks like you removed a "!", or did something to the XML to make it illegal syntax. Your comments about this stuff being completely foreign to systems programmers is fair. My best advice is to get help from a decent Java programmer who will have experience with XML, and probably Tomcat.

Lets address the SERVVARS member. Here is what we ship as a sample:
<?xml version='1.0' encoding='IBM-1047'?>
<!--
This is an XML fragment containing entity declarations (variables)
that can be used in the Tomcat SERVXML
-->

<!ENTITY httpPort "8080"> <!-- the Tomcat HTTP port -->
<!ENTITY sslPort "8443"> <!-- if SERVXML configured for SSL/TLS -->
<!ENTITY hostname "localhost"> <!-- normally don't need to change -->

<!-- The following used for DB2 type-2 JDBC only (see SERVXML) -->
<!-- db2Loc specifies the DB2 database aka "location" name. -->
<!-- Note: DB2_SSID must also be set in TCENV script for type-2 -->
<!ENTITY db2Loc "LOC1">

<!-- The following used for DB2 type-4 JDBC only (see SERVXML) -->
<!ENTITY db2url "jdbc:db2://127.0.0.1:446/LOC1">
<!ENTITY db2user "myuser">
<!ENTITY db2pass "mypass">
httpPort - change 8080 to the port you want to use.

sslPort - as the comment says, this is not used unless you configure SSL in the SERVXML member

You don't have to touch any of the DB2 stuff if you don't have DB2. Sorry if this isn't clear. .
R_Parham
Posts: 5
Joined: Wed Jul 14, 2010 6:49 am
Location: Raleigh, NC

Post by R_Parham »

TOMCAT now comes up after discarding the SERVVARS member I was using and refreshing it from the delivered one. I made the single change to httpPort only.
I cannot trace back what was causing my issues as yet and with my unfortunate current frustration level and work load probably will not even try, since I do not have the time available to do so.
My issue, I believe, started with my misreading of XML syntax. I surmised, after reading some XML syntax doc on the Web, the <! was a comment line. I then found it hard to believe that all the lines in the servvars that started with <! were in fact active directives and not comments.
As I mentioned, I do not know XML syntax. In hind site this was probably a good exercise. I believe I now have somewhat of a grasp on the basic XML syntax. It looks a bit wierd at 1st glance but maybe makes some sense with additional reviewing.
I still think <! compared to <!-- for comments is not very clear.
It seems comments would have been more clear and consistent with the markup language specifications if comments used their own start tag/end tag specification using something like "<$ /$>, or "<# /#>" for consistency rather than the completely different "--" added within the specification area itself.
After all my ramblings, I do really appreciate all the assistance in getting this started. I feel I have just opened up the bee hive reference configuration. I am sure I will be experiencing a lot of stings before I get this to a point of being secure and working as we would prefer.
Thanks to everyone for your patience with me in my learing curve and for the product you provide. Hopefully others are not as dense as I am when it comes to this setup.
Regards, Ray
Post Reply