Subject: Re: JDK for NetBSD?
To: None <netbsd-help@netbsd.org>
From: dmelton@banzuke.com <dmelton@banzuke.com>
List: netbsd-help
Date: 05/30/2002 00:53:48
Thanks for the input.  I was trying to be consistent and
start using pkgsrc for everything...  

I do have mod_jk installed, from the "www/ap-jk" package.

Anyway, I just downloaded and unpacked jakarta-tomcat-4.0.3 

The JDK installation sets up a default CLASSPATH variable of:
CLASSPATH=/usr/pkg/java/lib/classes.zip:.

I have JAVA_HOME set to /usr/pkg/java

When I run the new bin/startup.sh, I get a reasonable-looking
display of:
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-4.0.3
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.0.3/temp
Using JAVA_HOME:       /usr/pkg/java

But logs/catalina.out shows:
Unable to initialize threads: cannot find class java/lang/Thread

Thanks again,
  Dave



> At 7:57 +0200 30/05/02, dmelton@banzuke.com wrote:
> >I'm getting closer, but still no Tomcat...
> >
> >I have the Sun JDK 1.3 installed and working.
> >I've rebuilt Apache so I could install jserv.
> >Tomcat is installed, and Apache is configured to use it.
> >
> >When I try to start Tomcat, I get:
> >
> >java.lang.NoClassDefFoundError: org/xml/sax/HandlerBase
> >at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java)
> >at org.apache.tomcat.startup.Tomcat.main(Tomcat.java)
> >
> >My guess is that SAX would be part of the Crimson package,
> >which is also installed.  crimson.jar is in /usr/pkg/lib/java,
> >and /usr/pkg/lib/java is in my CLASSPATH.
> 
> I don't know which Tomcat you're using, but Tomcat 4 works straight from
> Jakarta.apache.org (I see absolutely no reason to use pkgsrc for 
> Tomcat). Just install Sun JDK-1.3.1_02 from pkgsrc and unpack Tomcat,
>  be sure to set JAVA_HOME=/usr/pkg/java, cd to wherever you unpacked 
> Tomcat and start it with bin/startup.sh
> 
> I believe the docs even say you _shouldn't_ put anything in the 
> classpath, as the startup script does this for you, and also Tomcat 
> 4 has a quite elaborate classloader hierarchy.
> 
> Also, jserv isn't really usable with Tomcat, is it? I'd suggest you use
> mod_jk for Apache, although you can probably do well without Apache
> altogether in many cases.
> 
> -Lasse