the problem is that the class loaders that are used internally by tomcat prevent the commons-logging.jar file from being seen/found/used by the different sub-componenets of tomcat itself.
You can try moving all of the jar files in $CATALINA_HOME/server/lib and $CATALINA_HOME/bin to $CATALINA_HOME/common/lib -- this will work, but it defeats the purpose of having the class loaders to protect the server itself. As I found out, there's nothing special that needs to be changed in server.xml and nothing out of the ordinary that's needed in jk2.properties.
I believe that the developer team is aware of the problem with the JNI/AF_UNIX socket code and the class loaders. There's talk that connector code (JK2) and the tomcat code (4.1.x) will be stable (closer to release-quality code) as of JK2 2.0.2/Tomcat 4.1.16 -- both should be available in the next week or so according to the traffic on the tomcat-developer list the last couple days.
Good luck.
Randall DuCharme wrote:
Greetings,
I have 4.1.15 installed with Apache 2.0.43 and the TCP
connector working. I can't seem to get the Unix
socket connector to work (channelUnix) per the example
pages and the document by Robert Williams.
Is there any required changes to server.xml that I'm
missing?
My workers2.properties:
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
#Using AF SOCKET
# Example unixsocket channel.
[channel.un:unixsocket]
file=/opt/jakarta/jakarta-tomcat-4.1.15/work/jk2.socket
# Define the worker
[ajp13:unixsocket]
channel=channel.un:unixsocket
# Uri mapping
[uri:/examples/*]
worker=ajp13:unixsocket
My jk2.properties:
#handler.list=apr,request,channelUnix
handler.list=request,container,channelUnix
channelUnix.file=${jkHome}/work/jk2.socket
# Dynamic Library
#jtc=/opt/jakarta/jakarta-tomcat-connectors-4.1.12-src
#apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so
# Just to check if the the config is working
# shm.file=${jkHome}/work/jk2.shm
If I put apr on the handler.list line I get Tomcat
errors like this...
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:556)
at
org.apache.jk.server.JkMain.start(JkMain.java:341)
at
org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:166)
at
org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1030)
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:512)
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)
Nov 24, 2002 11:28:32 AM 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:556)
at
org.apache.jk.server.JkMain.processProperty(JkMain.java:537)
at
org.apache.jk.server.JkMain.processProperties(JkMain.java:505)
at
org.apache.jk.server.JkMain.start(JkMain.java:346)
at
org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:166)
at
org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1030)
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:512)
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)
Nov 24, 2002 11:28:33 AM
org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on tcp port 8009
Nov 24, 2002 11:28:33 AM org.apache.jk.server.JkMain
start
INFO: Jk running ID=0 time=12/298 config=/opt/jakarta/jakarta-tomcat-4.1.15/conf/jk2.properties
Many thanks!
=====
Microsoft is not the answer.
Microsoft is the question.... and the answer is NO!
Randy (AD5GB)
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
