tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Seaver" <samsea...@hotmail.com>
Subject Re: jk2 and apache
Date Wed, 16 Apr 2003 16:27:37 GMT
Gareth

I really wanted to get this working, so I sat down and had a good go at it.

At first I started swapping jar files around tomcat, and restarting tomcat 
to see what was necessary. I then took out a lot of jar files and tried to 
find the bare minimum. The class loader how-to in the documentation helped.

But i got a bit confused, espcecially as I had thrown in quite a few jars 
for developing applications, so i saved all my work in a different 
directory, and totally deleted the old tomcat directory, and untarred it all 
over again.

This gave me a fresh start, and let me see again what the default jar files 
were in which directories.

Going back to the jk2, i came across the SAME error again! But looking 
around some documentation, 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html
i found somewhere in the virtual hosting example that if tomcat complaining 
about missing apr stuff, to just leave it out of the line:

"list.handler=apr,channel.Socket,request"

which I did: list.handler=channel.Socket,request.

This worked fine.

Then to try and get the jk2 to work at all, just to get me going, i followed 
the minimum configuration layout in 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html

the specified minimal configuration worked for me. I then set-up my own 
virtual host in httpd.conf, workers2.properties, jk2.properties and 
server.xml, and have got it working fine now!

So if you have a go at the confighowto, and still cant do it, post a couple 
of the above mentioned files and i'll have a look see.

BTW i tried to use the UNIX socket method, but gave up and went for the 
channel forwarding method...

cheers
S

>
>Sam,
>
>I had a similar problem when I first installed tomcat / jk2 (still not got
>it running correctly) and the only way I could overcome this problem was to
>copy the commons-logging, commons-beanutil, commons-digester and
>commons-modeler (possibly mx4j-jmx - can't remember) jars into the tomcat
>common/lib directory. These jars should, I believe, exist in the tomcat
>server/lib directory but I still got this error. If you get a definitive
>answer then please post it so that I can structure my install correctly.
>
>Gareth
>
>----- Original Message -----
>From: "Sam Seaver" <samseaver@hotmail.com>
>To: <tomcat-user@jakarta.apache.org>; <SERVLET-INTEREST@JAVA.SUN.COM>
>Sent: Monday, April 14, 2003 10:16 PM
>Subject: jk2 and apache
>
>
> > I've been trying to connect tomcat to apache, instead of running tomcat
> > alone. This is to avoid having to run tomcat as root...
> >
> > It isn't working. I believe ive configured Apache correctly, and the
> > server.xml correctly in tomcat, but
> >
> > I get this error message in the catalina.out:
> >
> > Apr 14, 2003 4:06:29 PM org.apache.jk.server.JkMain newHandler
> > SEVERE: Can't create apr
> > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> >         at org.apache.jk.apr.AprImpl.<clinit>(AprImpl.java:340)
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:140)
> >         at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
> >         at org.apache.jk.server.JkMain.start(JkMain.java:316)
> >         at
> > org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:164)
> >         at
> > 
>org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1026)
> >         at
> > org.apache.catalina.core.StandardService.start(StandardService.java:506)
> >         at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> >         at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
> >         at 
>org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> >         at 
>org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>)
> >         at
> >
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at 
>org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> > Apr 14, 2003 4:06:29 PM org.apache.jk.server.JkMain newHandler
> > SEVERE: Can't create apr
> > java.lang.NoClassDefFoundError
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:140)
> >         at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
> >         at org.apache.jk.server.JkMain.processProperty(JkMain.java:475)
> >         at 
>org.apache.jk.server.JkMain.processProperties(JkMain.java:442)
> >         at org.apache.jk.server.JkMain.start(JkMain.java:321)
> >         at
> > org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:164)
> >         at
> > 
>org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1026)
> >         at
> > org.apache.catalina.core.StandardService.start(StandardService.java:506)
> >         at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> >         at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
> >         at 
>org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> >         at 
>org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>)
> >         at
> >
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at 
>org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> > Apr 14, 2003 4:06:29 PM org.apache.jk.common.ChannelSocket init
> > INFO: JK2: ajp13 listening on tcp port 8009
> > Apr 14, 2003 4:06:29 PM org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=85/138
> > config=/usr/local/jakarta-tomcat-4.1.12/conf/jk2.properties
> >
> > In my tomcat connectors directory, ive got all these jars, but im not 
>sure
> > which ones to use:
> >
> > ./jk/build/lib/tomcat-coyote.jar
> > ./jk/build/lib/tomcat-jk.jar
> > ./jk/build/lib/jkconfig.jar
> > ./jk/build/lib/jkshm.jar
> > ./jk/build/lib/tomcat-jk2.jar
> > ./jk/build/lib/tomcat-jni.jar
> > ./util/build/lib/tomcat-util.jar
> > ./util/build/lib/commons-logging.jar
> > ./coyote/build/lib/tomcat-coyote.jar
> > ./coyote/build/lib/tomcat33-coyote.jar
> > ./http11/build/lib/tomcat-http11.jar
> > ./http11/build/lib/tomcat33-resource.jar
> > ./http11/build/lib/tomcat-util.jar
> > ./http11/build/lib/tomcat-coyote.jar
> > ./http11/build/lib/tomcat33-coyote.jar
> > ./lib/commons-logging-api.jar
> > ./lib/mx4j.jar
> > ./lib/mx4j-tools.jar
> > ./lib/log4j.jar
> > ./lib/commons-logging.jar
> > ./jtc.jar
> >
> > anyone? Also should i copy the needed Jar into my webapp/WEB-INF/lib, or
>in
> > the common/lib directory?
> >
> > Thanks
> > Sam
> >
> >
> > _________________________________________________________________
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


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


Mime
View raw message