You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Lampert <ja...@touchtonecorp.com> on 2012/01/23 18:47:16 UTC

Tomcat 7 in Java 6 on V5R4 (. . . 3 . . . 2 . . . 1 . . . crash-on-takeoff)

We're now trying to bring up Tomcat 7 on a V5R4 AS/400, after 
successfully doing so on V6 and V7 boxes. They have Java 6 installed, 
and I'm told that they installed some PTFs over the weekend, but it's 
still crashing on takeoff.

In catalina.sh, we have:
> # Java 6 settings if needed                                                                                 
> export -s JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre                                          
> export -s CATALINA_HOME=/wintouch/tomcat                                                                    
> export -s JAVA_OPTS="-Dos400.awt.native=true -Djava.awt.headless=true -Djava.version=1.6 -Xms256m -Xmx512m" 
>                                                                                                             
> # OS specific support.  $var _must_ be set to either true or false.                                         
> cygwin=false                                                                                                
> darwin=false                                                                                                
> os400=true                                                                                                  
> case "`uname`" in                                                                                           
> CYGWIN*) cygwin=true;;                                                                                      
> Darwin*) darwin=true;;                                                                                      
> OS400*) os400=true;;                                                                                        
> esac                                                                                                        

and there is definitely a "java" in the
/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre/bin directory, and so far
as I'm aware, all the JARs are present in the right subdirectories of
/wintouch/tomcat, but in catalina.out, I get:
> Attaching Java program to /QIBM/ProdData/Java400/jdk6/lib/charsets.jar.                  
> Attaching Java program to /QIBM/ProdData/Java400/jdk6/lib/resources.jar.                 
> Attaching Java program to /QIBM/ProdData/Java400/jdk6/lib/rt.jar.                        
> eval: 001-0014 Command /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre/bin/java not found.
> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina                   
> at java.net.URLClassLoader.findClass(URLClassLoader.java:432)                           
> at java.lang.ClassLoader.loadClass(ClassLoader.java:642)                                
> at java.lang.ClassLoader.loadClass(ClassLoader.java:608)                                
> at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:236)                       
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)                       

When I delete catalina.out and try again, I get the same, only starting
from the ClassNotFoundException.

--
JHHL

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


Re: Tomcat 7 in Java 6 on V5R4 (. . . 3 . . . 2 . . . 1 . . . crash-on-takeoff)

Posted by James Lampert <ja...@touchtonecorp.com>.
Caldarale, Charles R wrote:
> One thing you didn't tell us was exactly how you start Tomcat.  Have
> you tried starting Tomcat from a command prompt so you can see the
> display of the derived variables, such as CLASSPATH?

We start it from a variation of the OS/400 CL program given in this blog 
entry by "BetterThanZero": 
http://as400samplecode.blogspot.com/2011/06/install-tomcat-on-iseries-as400-tomcat.html

His CL program is:

> PGM                                                      
> ADDENVVAR  ENVVAR(JAVA_HOME) +                           
>              VALUE('/QIBM/ProdData/Java400/jdk15')       
> MONMSG     MSGID(CPF0000)                                
> SBMJOB     CMD(QSH +                                      
>              CMD('/apache/apache-tomcat-6.0.32/bin/start+
>              up.sh')) JOB(CATALINA) JOBQ($jobqName) +        
>              CPYENVVAR(*YES) ALWMLTTHD(*YES)              

ours is adjusted to where we put Tomcat in the file system.

And up until a few minutes ago (hours after I first looked at your 
post), how to launch from a command line had not occurred to me (the 
answer, of course, would be to type the value of the CMD parameter on 
the "adjusted" version of the SBM job above (sometimes, even after 
almost eighteen years of working with the AS/400 platform, I surprise 
myself with how dense I can be!).

At any rate,

> qsh CMD('/WINTOUCH/TOMCAT/BIN/STARTUP.SH')

produces:

> /WINTOUCH/TOMCAT/BIN/catalina.sh: 001-0019 Error found searching for command 
> tty. No such path or directory.                                              
> Using CATALINA_BASE:   /wintouch/tomcat                                      
> Using CATALINA_HOME:   /wintouch/tomcat                                      
> Using CATALINA_TMPDIR: /wintouch/tomcat/temp                                 
> Using JRE_HOME:        /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre        
> Using CLASSPATH:       /wintouch/tomcat/bin/bootstrap.jar:/wintouch/tomcat/bi
> n/tomcat-juli.jar                                                            

at which point it sits there for under 2 seconds before terminating, 
leaving this in catalina.out:

> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina 
> at java.net.URLClassLoader.findClass(URLClassLoader.java:432)         
> at java.lang.ClassLoader.loadClass(ClassLoader.java:642)              
> at java.lang.ClassLoader.loadClass(ClassLoader.java:608)              
> at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:236)     
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)     

By contrast, if I enter the same command on a command line on our V6 
box, I got the same, except for the initial "no such path or directory" 
exception, and then it sat there until I signed on from another terminal 
session and (after first verifying that the port had opened) terminating 
Tomcat.

--
JHHL

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


RE: Tomcat 7 in Java 6 on V5R4 (. . . 3 . . . 2 . . . 1 . . . crash-on-takeoff)

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: James Lampert [mailto:jamesl@touchtonecorp.com] 
> Subject: Tomcat 7 in Java 6 on V5R4 (. . . 3 . . . 2 . . . 1 . . . crash-on-takeoff)

> In catalina.sh, we have:
> > # Java 6 settings if needed                                                                                 
> > export -s JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre                                          
> > export -s CATALINA_HOME=/wintouch/tomcat                                                                    
> > export -s JAVA_OPTS="-Dos400.awt.native=true -Djava.awt.headless=true -Djava.version=1.6 -Xms256m -Xmx512m" 

It's considered bad form to modify catalina.sh; create a setenv.sh script and put your environment changes there.

> # OS specific support.  $var _must_ be set to either true or false.                                         
> os400=true

Why was it necessary to force os400 to true?

> eval: 001-0014 Command /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre/bin/java not found.

That's not a good sign, but it looks like some java executable was found.  What prints the above message with the odd prefix?

> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina                   

The above would indicate that setclasspath.sh failed.

One thing you didn't tell us was exactly how you start Tomcat.  Have you tried starting Tomcat from a command prompt so you can see the display of the derived variables, such as CLASSPATH?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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