Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2006, 12:06 AM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem in configuring tomcat and apache

I am configuring tomcat and apache through mod_jk on Linux. In the server.xml file in /TOMCAT_HOME/conf, I have added this line:
<Listener className="org.apache.jk.config.ApacheConfig" modJk="/TOMCAT_HOME/mod_jk/mod_jk.so" />

And when I restart the tomcat, I get this error:
Caused by: java.lang.RuntimeException: Unable to create path to config file:
/usr/local/tomcat/apache-tomcat-5.5.15/conf/auto/mod_jk.conf

Here is what's in 'catalina.out'
----------------------------------------------------------------------

usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { start | stop }
Sep 14, 2006 11:11:02 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/default/jre/lib/i386/client:/usr/java/default/jre/lib/i386
Sep 14, 2006 11:11:02 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 801 ms
Sep 14, 2006 11:11:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 14, 2006 11:11:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.15
Sep 14, 2006 11:11:02 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
 INFO [main] (LoadQuartzServlet.java:108) - Working?...
 INFO [main] (SchedulerWrapper.java:72) - ------- Starting up -----------------------
 INFO [main] (SimpleThreadPool.java:253) - Job execution threads will use class loader of thread: main
 INFO [main] (RAMJobStore.java:143) - RAMJobStore initialized.
 INFO [main] (StdSchedulerFactory.java:919) - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
 INFO [main] (StdSchedulerFactory.java:923) - Quartz scheduler version: 1.4.5
 INFO [main] (QuartzScheduler.java:370) - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
 INFO [main] (SchedulerWrapper.java:84) - ------- Startup complete ------------------
 INFO [main] (PublishingEnvironment.java:83) - Did not load publishing configuration from publisher.xconf (No such file or directory: /home/behemoth/lenya/lenya/pubs/blog/config/publishing/publisher.xconf). That means you can't access all PublishingEnvironment parameters and you should only use the AntTask. But don't panic, this file has been DEPRECATED.
 INFO [main] (LoadQuartzServlet.java:110) - OK
Sep 14, 2006 11:11:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/../WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Sep 14, 2006 11:11:07 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Sep 14, 2006 11:11:07 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Sep 14, 2006 11:11:08 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='resources.ApplicationResources', returnNull=true
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.commons.daemon.support.DaemonLoader.sta rt(DaemonLoader.java:177)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:275)
        ... 5 more
Caused by: java.lang.RuntimeException: Unable to create path to config file :/usr/local/tomcat/apache-tomcat-5.5.15/conf/auto/mod_jk.conf
        at org.apache.jk.config.BaseJkConfig.getConfigFile(Ba seJkConfig.java:428)
        at org.apache.jk.config.ApacheConfig.initProperties(A pacheConfig.java:229)
        at org.apache.jk.config.BaseJkConfig.execute(BaseJkCo nfig.java:133)
        at org.apache.jk.config.BaseJkConfig.lifecycleEvent(B aseJkConfig.java:124)
        at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1020)
        at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:442)
        at org.apache.catalina.core.StandardService.start(Sta ndardService.java:450)
        at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalin a.java:551)
        ... 10 more
----------------------------------------------------------------------

Any idea?

Joseph
 
Old October 9th, 2006, 08:28 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does /usr/local/tomcat/apache-tomcat-5.5.15/conf/auto/mod_jk.conf exist? Does the user you're running Tomcat or Apache under have rights to access it? Perhaps chmod a+r mod_jk.conf, or add the user's group to the file's group.

Or were you expecting Tomcat to look for mod_jk.conf somewhere else?

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache tomcat problem... joshi.sujit Apache Tomcat 0 April 15th, 2008 09:34 AM
apache tomcat manager problem u01jmg3 Apache Tomcat 0 March 17th, 2007 07:21 AM
Problem with Servlet from Tomcat to Apache holdmykidney Servlets 0 April 28th, 2005 07:38 AM
Configuring Apache + Tomcat using mod_jk2 gnseg BOOK: Professional Apache Tomcat 2 November 23rd, 2004 06:10 PM
Apache + Tomcat Problem rammy Apache Tomcat 1 January 2nd, 2004 12:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.