You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stuart Morgan <bb...@hotmail.com> on 2001/10/30 02:29:31 UTC

Tomcat Apache config error-Please help

Hiya,

I am quite new to Apache and Tomcat. I am also doing this a Mac running OSx 
10.1 if that makes a difference.

I have installed Tomcat and mod_jk. When I try and add the following line I 
am getting a config error.

Lines I am trying to add:
       <Connector
                className="org.apache.tomcat.service.PoolTcpConnector">
                <Parameter name="handler" 
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
                <Parameter name="port" value="8009"/>
        </Connector>

Error I am getting:
2001-10-29 19:46:50 - SessionIdGenerator: Opening /dev/urandom
ERROR reading /usr/local/tomcat/conf/server.xml
At Line 228 /Server/ContextManager/Connector/ 
className=org.apache.tomcat.service.PoolTcpConnector

2001-10-29 19:46:52 - ContextManager: FATAL: configuration error - 
java.lang.ClassNotFoundException: org.apache.tomcat.service.PoolTcpConnector

This is what my server.xml file looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>

    <!-- You can add a "home" attribute to represent the "base" for
         all relative paths. If none is set, the TOMCAT_HOME property
         will be used, and if not set "." will be used.
         webapps/, work/ and log/ will be relative to this ( unless
         set explicitely to absolute paths ).
      -->
    <ContextManager debug="0" workDir="work" >

      <!-- ==================== Global modules ==================== -->

        <LogSetter name="tc_log" timestamps="true"
                   verbosityLevel="INFORMATION"  />

        <LogEvents enabled="false" />

        <!-- Backward compat: read the Context declarations from 
server.xml-->
        <ContextXmlReader config="conf/server.xml" />

        <!-- Separated Context -->
        <ContextXmlReader config="conf/apps.xml" />

        <AutoDeploy source="webapps" target="webapps" />

        <AutoWebApp dir="webapps" host="DEFAULT" />

        <ApacheConfig />
<!--
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
                <Parameter name="handler" 
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler" />
                <Parameter name="port" value="8009" />
        </Connector>
-->
        <PolicyLoader securityManagerClass="java.lang.SecurityManager"
                      policyFile="conf/tomcat.policy" />

        <SimpleMapper1 debug="0" />

        <SessionExpirer checkInterval="60" />
        <!-- For development you can use randomClass="java.util.Random" -->
        <SessionIdGenerator randomClass="java.security.SecureRandom"
                            randomFile="/dev/urandom" />


        <!-- ========== context processing modules ========== -->

        <!-- This will be the "default" profile
             ( all except the "global" modules can be set per context )
          -->
        <LogSetter name="servlet_log"
                   timestamps="true"
                   verbosityLevel = "INFORMATION"
                   path="logs/servlet-${yyyyMMdd}.log"
                   />

        <LogSetter  name="JASPER_LOG"
                   timestamps="true"
                   path="logs/jasper-${yyyyMMdd}.log"
                   verbosityLevel = "INFORMATION"  />

        <LoaderInterceptor11  useApplicationLoader="true" />

        <WebXmlReader validate="true" />

        <ErrorHandler showDebugInfo="true" />

        <WorkDirSetup cleanWorkDir="false" />

        <Jdk12Interceptor />

        <!-- Non-standard invoker, for backward compat. ( /servlet/* ) -->
        <InvokerInterceptor />

        <!-- you can add javaCompiler="jikes" -->
        <JspInterceptor keepGenerated="true"
                        largeFile="false"
                        sendErrToClient="true"
                        useJspServlet="false"
                        />

        <StaticInterceptor  debug="0" listings="true" />

        <ReloadInterceptor fullReload="true" />

        <SimpleSessionStore maxActiveSessions="-1" />

        <AccessInterceptor />

        <CredentialsInterceptor />

        <SimpleRealm  filename="conf/users/global-users.xml" />

       <!-- UnComment the following and comment out the
            above to get a JDBC realm.
            Other options for driverName:
              driverName="oracle.jdbc.driver.OracleDriver"
              connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
              connectionName="scott"
              connectionPassword="tiger"

              driverName="org.gjt.mm.mysql.Driver"
              connectionURL="jdbc:mysql://localhost/authority"
              connectionName="test"
              connectionPassword="test"

            "connectionName" and "connectionPassword" are optional.
        -->
        <!--
        <JDBCRealm
            debug="99"
            driverName="sun.jdbc.odbc.JdbcOdbcDriver"
            connectionURL="jdbc:odbc:TOMCAT"
            userTable="users"
            userNameCol="user_name"
            userCredCol="user_pass"
            userRoleTable="user_roles"
            roleNameCol="role_name" />
        -->

        <LoadOnStartupInterceptor />

        <Servlet22Interceptor />


        <!-- Tag pooling support.
             To enable the reuse of tag handlers as described in
             the JSP spec, uncomment the following.  If your pages
             use a lot of custom tags, you should see a nice performance
             gain.

             Note that placing the interceptor here will enable
             Tag pooling for all of the web applicatitions loaded -
             this may be a bad thing if all tags are not coded to
             handle reuse. To enable pooling only for specific web
             applications i.e. Contexts, place the interceptor inside of
             the Context's definition.

             To view information about tag usage uncomment the tag
             LogSetter. Set verbosityLevel to DEBUG to see everytime
             a tag is obtained and released.
        -->
        <!--
        <LogSetter  name="tag_pool_log" timestamps="true"
            path="logs/tagpool-${yyyyMMdd}.log"
            verbosityLevel="INFORMATION" />

        <TagPoolManagerInterceptor debug="0"/>
        -->

        <!-- Request processing -->
        <DecodeInterceptor debug="0" />

        <SessionId cookiesFirst="true" noCookies="false" />




      <!-- ==================== Connectors ==================== -->

       <!-- new http adapter. Attributes:
               secure - use SSL ( https )
               keystore, keypass - certs for SSL
               port -->
        <Http10Interceptor port="8080"
                           secure="false"
                           maxThreads="100"
                           maxSpareThreads="50"
                           minSpareThreads="10" />

        <!--
            Uncomment this for SSL support.
            You _need_ to set up a server certificate if you want this
            to work, and you need JSSE.
            1. Add JSSE jars to CLASSPATH
            2. Edit java.home/jre/lib/security/java.security
               Add:
               security.provider.2=com.sun.net.ssl.internal.ssl.Provider
            3. Do: keytool -genkey -alias tomcat -keyalg RSA
               RSA is essential to work with Netscape and IIS.
               Use "changeit" as password. ( or add keypass attribute )
               You don't need to sign the certificate.

            You can set parameter keystore and keypass if you want
            to change the default ( user.home/.keystore with changeit )
         -->
        <!--
        <RequestInterceptor
         className="org.apache.tomcat.modules.server.Http10Interceptor"
         port="8443"
         secure="true" />
        -->
        <!--
             JNI connector, make sure that you update the native_lib
             Parameter to point to your jni_connect.dll.
         -->
        <!--
        <RequestInterceptor
         className="org.apache.tomcat.modules.server.JNIConnectionHandler"
         nativeLibrary="D:\tomcat\bin\i386\jni_connect.dll" />
         -->

        <!-- Apache AJP12 support. This is also used to shut down tomcat.
             Parameter "address" defines network interface this Interceptor
             "binds" to. Delete it if you want to "bind" to all interfaces.

             address="127.0.0.1"

          -->
        <RequestInterceptor
         className="org.apache.tomcat.modules.server.Ajp12Interceptor"
         tomcatAuthentication="false"
         port="8007" />

        <!-- Apache AJP13 support (mod_jk)
             Parameter "address" defines network interface this Interceptor
             "binds" to. Delete it if you want to "bind" to all interfaces.
             address="127.0.0.1"
          -->

        <RequestInterceptor
        className="org.apache.ajp.tomcat33.Ajp13Interceptor"
        port="8009" />


       <Connector
                className="org.apache.tomcat.service.PoolTcpConnector">
                <Parameter name="handler" 
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
                <Parameter name="port" value="8009"/>
        </Connector>

      <!--
           Context definitions can be placed here ( not recommended ) or
           in separate files. The ContextXmlReader will read all context
           definitions ( you can customize the "base" filename ).

           The default is conf/apps-[name].xml.

           See conf/apps-examples.xml and conf/apps-admin.xml
       -->

    </ContextManager>
</Server>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>