GeeCON Prague 2014*
The moose likes Tomcat and the fly likes Apache-Tomcat integration issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache-Tomcat integration issues" Watch "Apache-Tomcat integration issues" New topic
Author

Apache-Tomcat integration issues

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Hi Buddies,

I am facing problems with Apache-Tomcat integration:

Softwares used:
apache_1.3.33-win32-x86-no_src
jakarta-tomcat-4.1.12
mod_jk v1.2

Step 1:
Configuring the tomcat:
In server.xml file of tomcat, I have uncommented the following:
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>

Step 2:
Created workers.properties with the following entries and stored in <CATALINA_HOME>/conf directory.

worker.list=testWorker
worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13

Step3:
Added the following stuff at the end of httpd.conf of apache.
LoadModule jk_module libexec/mod_jk.dll
AddModule mod_jk.c
JkWorkersFile "C:/Tomcat_4.1/conf/workers.properties"
JkLogFile "C:/Tomcat4.1/logs/mod_jk.log"
JkLogLevel debug
Alias /examples "C:/Tomcat4.1/webapps/examples"
JkMount /examples/servlet/* defaultWorker JkMount /examples/*.jsp defaultWorker <location "/examples/web-inf/"> AllowOverride None deny from all </location>

Step 4:
As said in the tutorial "http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html", I have started tomcat, I get the following error:

Feb 10, 2005 10:39:37 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Feb 10, 2005 10:39:37 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Feb 10, 2005 10:39:37 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
ServerLifecycleListener: createMBeans: MBeanException
java.lang.Exception: ManagedBean is not found with Ajp13Connector
at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225
)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:369)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:777)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:751)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve
rLifecycleListener.java:339)
at org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(Ser
verLifecycleListener.java:206)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:218
2)
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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12

The result is that the apache-tomcat integration is failed.

If you have any solution, pls. send me.

Thanks,
Guru
Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Guys,

I found myself in some other forum that the AjpConnector is deprecated and won't work with jmx, so, I have used CoyoteConnector instead. I have uncommented this is server.xml file.

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

and Commented the following:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false" />

It's working beautifully.

Thanks,
Guru
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache-Tomcat integration issues