Re: Apache Tomcat 4.1.30 - not working with iSeries after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-07 Thread James H. H. Lampert

On 9/7/17, 2:43 PM, Christopher Schultz wrote:

It sounds like James H.H. Lampert may be able to help you with your
problem. He's been pounding his head against his AS/400 environment
for years.


Greetings!

I finally get a chance to talk about something I know, rather than beg 
for help about something I don't know!


(And it's not necessary to use my middle initials when referring to me, 
so long as you leave out both of them. It's when people use one "H" and 
not the other that irritates me.) ;-)


Just seeing "Tomcat" and a reference to an IBM Midrange box was enough 
to catch my attention.


Everything I've come up with is based on the instructions to be found at
 
(or  if you prefer). It's currently an 
extremely slow-loading page.


What you want to do is go to the relevant download page at 
tomcat.apache.org (so far, I've ONLY run Tomcat 7 on IBM Midrange boxes, 
not earlier or later versions), and download the ZIP file (not the tar.gz).


Once you have it, figure out where you're going to put it in the IFS, 
and FTP the ZIP file into that directory.


Go into QSHELL, and navigate to where you put the ZIP file, and unzip it 
using Java's JAR command. (e.g., "JAR -xf apache-tomcat-7.0.81.zip")


Once that has completed, exit QSHELL. You might want to rename the 
Tomcat directory to something less cumbersome (our installations rename 
it to simply "tomcat")


If you're also looking at the web page, you should see a part about 
modifying catalina.sh, to force "os400" to "true." You can safely ignore it.


Now, to run Tomcat on an IBM Midrange box in any kind of meaningful way, 
you need to set up a CL program that will find the JVM, set up the 
environment variables, and launch the thing; it's simply not practical 
to do it any other way. The web page gives one very out-of-date version, 
based on running a very old Tomcat under a very old JVM that you 
probably don't have.


Our CL program, because we install it on customer boxes, is somewhat 
proprietary in nature, so I won't give you all of the source, and it's 
also fairly complex, checking for the existence of every JVM we have run 
Tomcat 7 under, and also every JVM we believe is reasonably likely to 
support Tomcat 7. It also allows us to launch Tomcat in a specific job 
queue, so it runs in a specific subsystem, and to specify minimum and 
maximum heap space (subject to the limitations of the JVM)


In our STRTOMCAT CL program, we start by building up a CL variable, 
"," that contains certain important Java options. As of just 
over a year ago, it includes:

-Dos400.awt.native=true
-Djava.awt.headless=true
-Djava.version=1.6
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Djavax.servlet.request.encoding=UTF-8
-Dfile.encoding=UTF-8
and -Xms and -Xmx options with the desired heap space parameters.

Next, it looks for a suitable JVM. Currently, the JVMs we look for, in 
the order we look for them, are:

/qopensys/QIBM/ProdData/JavaVM/jdk60/32bit
/qopensys/QIBM/ProdData/JavaVM/jdk60/64bit
/qopensys/QIBM/ProdData/JavaVM/jdk626/32bit
/qopensys/QIBM/ProdData/JavaVM/jdk626/64bit
/qopensys/QIBM/ProdData/JavaVM/jdk70/32bit
/qopensys/QIBM/ProdData/JavaVM/jdk70/64bit

Once we've found one, we ADDENVVAR ENVVAR(JAVA_HOME) with the full 
pathname of the JVM and REPLACE(*YES).


We also do an ADDENVVAR ENVVAR(CATALINA_HOME) with the full pathname of 
the Tomcat directory (including the Tomcat directory itself!) and 
REPLACE(*YES).


And we do another ADDENVVAR, this time
  ADDENVVAR ENVVAR(JAVA_OPTS) VALUE() REPLACE(*YES)

Finally, with everything else set up, we

 SBMJOB CMD(QSH +
  CMD('//bin/startup.sh')) +
  JOB(CATALINA) JOBD(/) +
  JOBQ(/) INLLIBL(QGPL +
  QTEMP) CPYENVVAR(*YES) ALWMLTTHD(*YES)
(omitting the JOBQ parameter if we're using the default job queue for 
the job description).


Obviously, you will want to use some combination of job description and 
job queue that won't put Tomcat into a one-job-at-a-time batch queue. 
But just as obviously, you need to submit it as a batch job, because 
otherwise, it's going to sit there, tying up your terminal session.


We have also done a similar ENDTOMCAT CL program, that goes through much 
of the same rigmarole to select a JVM and set up environment variables, 
and then submits "shutdown.sh" as a QShell batch job, and then sits 
there, checking for the presence of a CATALINA job, and if it doesn't go 
away within a reasonable amount of time, it then abends the CATALINA job.


Note that the CATALINA job doesn't really do a whole lot; the actual 
Tomcat server runs in a job called QP0ZSPWT, that is somehow chained to 
the CATALINA job. When one job dies (either naturally or forcibly), the 
other follows immediately.


--
James H. H. Lampert


-
To unsubscribe, e-mail: 

Re: Apache Tomcat 4.1.30 - not working with iSeries after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ananthi,

On 9/7/17 5:12 AM, Ananthi K4 wrote:
> We have installed Apache Tomcat version 4.1.30 on our iSeries
> server. Recently we have upgraded the OS400 Operating System from
> Version 7.1 to 7.3 where Java 7 and Java 8 are introduced. After
> this upgrade, Tomcat is giving an HTTP status 500 exception
> report.
> 
> We explored the Tomcat portal and found that we are running Tomcat
> on a lower version and that needs to be upgraded. But we are unable
> to find the exact procedure to install Tomcat on iSeries server.
> 
> There is a subsystem TOMCAT running on the system with Job QP0ZSPWT
> being Active.
> 
> Please advise on the version of TOMCAT that needs to be installed
> on the system as well the procedure to install it.

It sounds like James H.H. Lampert may be able to help you with your
problem. He's been pounding his head against his AS/400 environment
for years.

I'm sure there are some OS-specific things to watch out for, but I
believe Java+Tomcat should be fairly easy to run just about anywhere:
just unpack the distribution tarball and run startup.sh from a
Unix-compatible shell and you should be up and running.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZsb11AAoJEBzwKT+lPKRYSqgP/Ar1KeC70lL/gCXFXDhmYTZK
HiDDkHSRLotOAgtOKNK5//FdxV7L3PbGPlHquciPpfZSxbS5i/FizHKpMpoc62Sz
2+DYVplO9WwdWsjtDy63ZIN0sQ44t95FbuovwKlYq7Dd27CnfgKIruxPNy1myzTB
N7P2IneI7kXiYAuENZ/TnlddiF97r3xvOfi8/O/eYlD3pI5cQvg/YG5c7OrkxcMB
tovC+h1uZQFwOocOIfLQwWfv9kg4vi6bVFiHrlVmyruXmqbqqT42pgt0as25l1YC
q51IdkGPLuElfzGjWFPhPORGnjDaORaGv1AzE0CQsgSOKDuzqrxZqGAGEdoghPEe
3rE/hL35Aax/HL8UCJxI+zxaA+WSnSVe9TpGrnYq9W/adm/ftD1JhQI6zIRvakPU
3LlIXQ9eZNa2m4x6b7epwfc8l1rBv2/FYN6aLzXdiYOLStolVABUmlpsd9u9S7vU
h1T0QF/BwySB3JRpNtw/x+imLsJs5RsdyUk5lVrO9LcQUKR0GW4M/vDl9GrfUtiv
T363n9NWqlS3mRkz5078mNx/SxXp1K1nDCcocGX51yCnOLeQHshP5JWCysJQcKP7
WiiukfhaX29gLbsv3BwGh2RvNkwNsDTYeAwwWRey9gXFVPho2yUtsLNVl1gwzjYB
aHAVVJMDoQb9iffsKNEp
=jWe5
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Apache Tomcat 4.1.30 - not working with iSeries after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-07 Thread Ananthi K4


Hello,

We have installed Apache Tomcat version 4.1.30 on our iSeries server.
Recently we have upgraded the OS400 Operating System from Version 7.1 to
7.3 where Java 7 and Java 8 are introduced. After this upgrade, Tomcat is
giving an HTTP status 500 exception report.

We explored the Tomcat portal and found that we are running Tomcat on a
lower version and that needs to be upgraded. But we are unable to find the
exact procedure to install Tomcat on iSeries server.

There is a subsystem TOMCAT running on the system with Job QP0ZSPWT being
Active.

Please advise on the version of TOMCAT that needs to be installed on the
system as well the procedure to install it.



   
 Regards,   
   

   
 Ananthi K  
   
 iSeries Administrator - Sandvik Account
   

   






 Phone: 91-991-660-5881Manyata Tech Park, G2 
Block, 
 E-mail: ananthi.kr...@in.ibm.com  Bangalore, KA 
560045 
  
India