java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Hi, I'm using Tomcat 4.1.18 and mod_jk2 (2.0.4-dev) with Apache2 on Linux, Sun JDK 1.4.2_03. When Tomcat starts, it writes an error to catalina.out SEVERE: Can't create apr - java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory What do I miss? INFO: Initializing Coyote HTTP/1.1 on port 8079 Starting service Tomcat-Standalone Apache Tomcat/4.1.18 Jan 29, 2004 11:50:40 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8079 Jan 29, 2004 11:50:40 AM 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:141) 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:169) at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056) 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) Jan 29, 2004 11:50:40 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8017 Jan 29, 2004 11:50:40 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=2/121 config=/opt/tomcat/conf/jk2.properties - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Dima Gutzeit wrote: Check you servler/lib directory. commons-logging.jat should be there. It comes with Tomcat destribution. Hi, commons-logging.jar is in $CATALINA_HOME/server/lib. Disabling apr.NativeSo in $CATALINA_HOME/conf/jk2.properties suppresses the error message (# apr.NativeSo=/opt/apache/lib/libjkjni.so). Can someone explain me what's going on here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2, load balancing with two tomcats favors a single servlet engine
Hi, running Apache 2.0.47 / mod_jk2 2.0.2 / Tomcat 4.1.24 on RedHat Linux 8.0 with two instances of Tomcat having an identical webapps tree. The second servlet engine never gets as many sessions as the first servlet engine. I wrote a script to record the session counter available from http://localhost:portno/manager/list. How does mod_jk2 deliver the requests to the servlet engines? == /var/log/tomcat1/session_count.log == Nov 18 14:29:00 58 Nov 18 14:30:00 65 Nov 18 14:31:00 65 Nov 18 14:32:00 84 Nov 18 14:33:01 88 Nov 18 14:34:00 86 Nov 18 14:35:00 83 Nov 18 14:36:00 77 Nov 18 14:37:01 60 Nov 18 14:38:00 62 == /var/log/tomcat2/session_count.log == Nov 18 14:29:00 17 Nov 18 14:30:00 16 Nov 18 14:31:00 19 Nov 18 14:32:00 27 Nov 18 14:33:01 25 Nov 18 14:34:00 25 Nov 18 14:35:00 27 Nov 18 14:36:00 28 Nov 18 14:37:01 20 Nov 18 14:38:00 21 == /opt/apache/conf/workers2.properties === [config:] file=/opt/apache/conf/workers2.properties debug=0 debugEnv=0 [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=/opt/tomcat/work/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [channel.socket:localhost:8001] info=Ajp13 forwarding over socket debug=0 tomcatId=tomcat1 lb_factor=1 [channel.socket:localhost:8002] info=Ajp13 forwarding over socket debug=0 tomcatId=tomcat2 lb_factor=1 [status:] info=Status worker, display runtime information [uri:/jkstatus/*] info=Display status information and checks the config file for changes group=status: [...some URI mappings...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk or jk2
Cory 'G' Watson wrote: If starting a new _production_ setup, should I be using jk or jk2? I've seen conflicting information in my searches. Hi, I recommend mod_jk2 for apache2. I discovered mod_jk does not forward properly requests by their JSESSIONID to the right servlet engine in a two tomcat loadbalanced setup. Regards, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk or jk2
Florian Ebeling wrote: Hi, mod_jk2 is more or less undocumented. If you dont't want to dive into the C sources, be careful. mod_jk comes with quite solid descriptions. [...] Here's a great book including mod_jk2: http://www.oreilly.de/catalog/tomcat/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Internal Server Error, ErrorDocument does not work using mod_jk2 and servlet engine stopped
Hi, how can I customize Apache's error page if mod_jk2 does not get a usable worker (Tomcat is down)? Using Apache 2.0.47, mod_jk2 2.0.2 and Tomcat 4.1.24 running on Linux I get an error message when the servlet engine is stopped (Tomcat is down): The servlet container is temporary unavailable or being upgraded Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. httpd.conf defines: ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var This document (HTTP_INTERNAL_SERVER_ERROR.html.var) is shown when I try to execute a CGI script missing its x-bit in filesystem access rights. The first sentence (The servlet container is temporary unavailable or being upgraded) comes from mod_jk2 (jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/common/jk_worker_lb.c): #define NO_WORKER_MSG The servlet container is temporary unavailable or being upgraded\n; The next paragraphs are hardcoded into Apache (httpd-2.0.47/modules/http/http_protocol.c, get_canned_error_string()): default:/* HTTP_INTERNAL_SERVER_ERROR */ /* * This comparison to expose error-notes could be modified to * use a configuration directive and export based on that * directive. For now * is used to designate an error-notes * that is totally safe for any user to see (ie lacks paths, * database passwords, etc.) */ if (((error_notes = apr_table_get(r-notes, error-notes)) != NULL) (h1 = apr_table_get(r-notes, verbose-error-to)) != NULL (strcmp(h1, *) == 0)) { return(apr_pstrcat(p, error_notes, p /\n, NULL)); } else { return(apr_pstrcat(p, pThe server encountered an internal error or\n misconfiguration and was unable to complete\n your request./p\n pPlease contact the server administrator,\n , ap_escape_html(r-pool, r-server-server_admin), and inform them of the time the error occurred,\n and anything you might have done that may have\n caused the error./p\n pMore information about this error may be available\n in the server error log./p\n, NULL)); } The last sentence comes from ap_send_error_response() in httpd-2.0.47/modules/http/http_protocol.c: if (recursive_error) { ap_rvputs_proto_in_ascii(r, pAdditionally, a , status_lines[ap_index_of_response(recursive_error)], \nerror was encountered while trying to use an ErrorDocument to handle the request./p\n, NULL); } Regards, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2: mod_jk child workerEnv in error state 46
Hi, I've got Apache 2.0.47, two Tomcats 4.1.24 and mod_jk2 2.0.2 running on Linux. There are lots of lines containing mod_jk child workerEnv in error state 46. Does it harm? [Tue Oct 14 11:11:37 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:38 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:38 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:39 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:39 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:39 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:39 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 [Tue Oct 14 11:11:40 2003] [error] mod_jk child workerEnv in error state 46 - server.xml: !-- Define a Coyote/JK2 AJP 1.3 Connector on port 28039 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=28039 minProcessors=10 maxProcessors=250 enableLookups=false redirectPort=8443 acceptCount=25 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ - server.xml: !-- Define a Coyote/JK2 AJP 1.3 Connector on port 18039 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=18039 minProcessors=10 maxProcessors=250 enableLookups=false redirectPort=8443 acceptCount=25 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ - workers2.properties: [channel.socket:localhost:18039] info=Ajp13 forwarding over socket debug=0 tomcatId=tomcat18039 lb_factor=1 [channel.socket:localhost:28039] info=Ajp13 forwarding over socket debug=0 tomcatId=tomcat28039 lb_factor=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]