Can't find a user written filter

Discussion in 'Server Operation' started by anw, Feb 4, 2007.

  1. anw

    anw New Member

    I have a development machine that everything works find on, and I'm trying to
    deploy to a production machine, and for some reason it's not finding my
    filter. The fact that it *knows* about the filter indicates (well, at least,
    I think it indicates) that it found the web app and associated directories.
    The public URL is http://www.infoisland.net, which points
    to /var/www/infoisland in the file system.

    On the apache side, here's the apache host entry:

    Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    <VirtualHost *:80>
    	ServerName www.infoisland.net
    	DocumentRoot /var/www/infoisland
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    
    	<Directory /var/www/infoisland>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    		# Uncomment this directive is you want to see apache2's
    		# default start page (in /apache2-default) when you go to /
    		#RedirectMatch ^/$ /apache2-default/
    	</Directory>
    
    	ServerAdmin [email protected]
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /var/log/apache2/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel debug
    
    	CustomLog /var/log/apache2/access.log combined
    	ServerSignature On
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
        Alias /forums "/var/www/pubhtm/forums"
        <Directory "/var/www/pubhtm/forums">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Allow from all
        </Directory>
    
    </VirtualHost>
    
    <VirtualHost *:80>
    	ServerName www.mywinterpark.org
    	DocumentRoot /var/www/mywinterpark
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    
    	<Directory /var/www/mywinterpark>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    		# Uncomment this directive is you want to see apache2's
    		# default start page (in /apache2-default) when you go to /
    		#RedirectMatch ^/$ /apache2-default/
    	</Directory>
    
    	ErrorLog /var/log/apache2/error.log
    	LogLevel debug
    	CustomLog /var/log/apache2/access.log combined
    	ServerSignature On
    	Alias /forums "/var/www/pubhtm/forums"
        	<Directory "/var/www/pubhtm/forums">
                Options Indexes MultiViews FollowSymLinks
                AllowOverride None
                Allow from all
        	</Directory>
    </VirtualHost>
    
    <VirtualHost *:443>
      SSLEngine on
      SSLCertificateFile ssl/infoisland.crt
      SSLCertificateKeyFile ssl/infoisland.key
      DocumentRoot /var/www/infoisland
    </VirtualHost>
    
    (I had to remove the mod_jk configuration because my post was too long. Let me know if you need it)

    On the tomcat side, here's the server.xml section:

    Code:
    <Host name="www.infoisland.net" appBase="/var/www"
           unpackWARs="true" autoDeploy="true"
           xmlValidation="false" xmlNamespaceAware="false">
    	<Context path="/infoisland" debug="255"
    	         docBase="infoisland"
    		 crossContext="true"
    	         reloadable="true">
                <Manager className="org.apache.catalina.session.PersistentManager"
    	        debug="255" saveOnRestart="false">
    	    </Manager>
    
                 <Resource name="jdbc/infoisland" auth="Container"
    type="javax.sql.DataSource"
    	               maxActive="20" maxIdle="5" maxWait="10000" username="anw"
    		       password="anw111" driverClassName="com.mysql.jdbc.Driver"
    		       url="jdbc:mysql://localhost:3306/smsinfo?autoReconnect=true"/>
            </Context>
    
          </Host>
    
    And, on the app side, here's the web.xml entry for the filter:

    Code:
      <!-- Filters Here -->
      <filter>
        <filter-name>CheckUser</filter-name>
        <filter-class>infoIsland.CheckUser</filter-class>
        <init-param>
          <param-name>loginPage</param-name>
          <param-value>/login.jsp</param-value>
        </init-param>
      </filter>
    
      <filter-mapping>
        <filter-name>CheckUser</filter-name>
        <url-pattern>/members/*</url-pattern>
      </filter-mapping>
    
    and here's the directory listing of the WEB-INF/classes directory (directly
    under the /var/www/infoisland directory):

    Code:
    total 24
    drwxr-xr-- 6 anw  anw  4096 2007-02-03 13:54 ./
    drwxr-xr-x 4 anw  anw  4096 2007-02-02 22:10 ../
    drwxr-xr-x 2 root root 4096 2007-02-02 18:10 dbMgr/
    drwxr-xr-x 2 anw  anw  4096 2007-02-02 18:10 infoIsland/
    drwxr-xr-x 2 root root 4096 2007-02-02 18:10 utils/
    
    and here is the WEB-INF/classes/infoisland listing, showing the CheckUser
    class:

    Code:
    total 96
    drwxr-xr-x 2 anw anw 4096 2007-02-02 18:10 ./
    drwxr-xr-- 6 anw anw 4096 2007-02-03 13:54 ../
    [BOLD]-rwxr-xr-x 1 anw anw 3899 2007-02-02 18:10 CheckUser.class*[/BOLD]
    -rwxr-xr-x 1 anw anw 4977 2007-02-02 18:10 Client.class*
    -rwxr-xr-x 1 anw anw 2624 2007-02-02 18:10 login.class*
    -rwxr-xr-x 1 anw anw 2830 2007-02-02 18:10 NewTribe.class*
    -rwxr-xr-x 1 anw anw  610 2007-02-02 18:10 ReqMgr$1.class*
    -rwxr-xr-x 1 anw anw 8273 2007-02-02 18:10 ReqMgr.class*
    -rwxr-xr-x 1 anw anw 1653 2007-02-02 18:10 reqstatus.class*
    -rwxr-xr-x 1 anw anw 6867 2007-02-02 18:10 ReqTag.class*
    -rwxr-xr-x 1 anw anw 1944 2007-02-02 18:10 reqtype.class*
    -rwxr-xr-x 1 anw anw 3682 2007-02-02 18:10 request.class*
    -rwxr-xr-x 1 anw anw 1605 2007-02-02 18:10 subscription.class*
    -rwxr-xr-x 1 anw anw 1307 2007-02-02 18:10 subtopic.class*
    -rwxr-xr-x 1 anw anw 4689 2007-02-02 18:10 tribe.class*
    -rwxr-xr-x 1 anw anw 3501 2007-02-02 18:10 TribeMgr.class*
    -rwxr-xr-x 1 anw anw 5985 2007-02-02 18:10 user.class*
    -rwxr-xr-x 1 anw anw 3023 2007-02-02 18:10 UserMenu.class*
    
    And, lastly, here is the output of tomcat, throwing an exception because it
    can't find CheckUser:
    Code:
    Feb 3, 2007 2:39:37 PM 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/lib/jdk1.6.0/jre/lib/i386/server:/usr/lib/jdk1.6.0/jre/lib/i386:/usr/lib/jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
    Feb 3, 2007 2:39:37 PM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Feb 3, 2007 2:39:37 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2332 ms
    Feb 3, 2007 2:39:38 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Feb 3, 2007 2:39:38 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5
    Feb 3, 2007 2:39:38 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Feb 3, 2007 2:39:39 PM org.apache.catalina.session.PersistentManagerBase start
    SEVERE: No Store configured, persistence disabled
    Feb 3, 2007 2:39:39 PM org.apache.catalina.core.StandardContext filterStart
    SEVERE: Exception starting filter CheckUser
    java.lang.ClassNotFoundException: infoIsland.CheckUser
    	at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
    	at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
    	at
    org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:209)
    	at
    org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
    	at
    org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
    	at
    org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    	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:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    Feb 3, 2007 2:39:39 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error filterStart
    Feb 3, 2007 2:39:39 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/infoisland] startup failed due to previous errors
    
    I have also tried putting a infoisland.jar file in the WEB-INF/lib directory,
    with exactly the same results.

    TIA,
    Allen
     

Share This Page