-4

I have a problem with java web project : I think it relate to config file But currenly I dont have solution to resolve it . So hope anyone can help me.

INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [111] milliseconds.
log4j:WARN No appenders could be found for logger (org.seasar.extension.filter.RequestDumpFilter).
log4j:WARN Please initialize the log4j system properly.
thg 11 16, 2015 8:50:19 SA org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter sessionfilter
java.lang.ClassNotFoundException: jp.co.colotown.seasar2.filter.SessionFilter
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4583)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

thg 11 16, 2015 8:50:19 SA org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more Filters failed to start. Full details will be found in the appropriate container log file
thg 11 16, 2015 8:50:19 SA org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Colotown] startup failed due to previous errors

Code web.xml

<?xml version="1.0"?>

<!--
 * Copyright 2004-2006 the Seasar Foundation and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

    <context-param>
        <param-name>sastruts.VIEW_PREFIX</param-name>
        <param-value>/WEB-INF/view</param-value>
    </context-param>

     <filter>
        <filter-name>sessionfilter</filter-name>
         <filter-class>jp.co.colotown.seasar2.filter.SessionFilter</filter-class>
    </filter>

    <filter>
        <filter-name>encodingfilter</filter-name>
        <filter-class>org.seasar.extension.filter.EncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>hotdeployfilter</filter-name>
        <filter-class>org.seasar.framework.container.hotdeploy.HotdeployFilter</filter-class>
    </filter>

    <filter>
        <filter-name>s2filter</filter-name>
        <filter-class>org.seasar.framework.container.filter.S2ContainerFilter</filter-class>
    </filter>

    <filter>
        <filter-name>routingfilter</filter-name>
        <filter-class>org.seasar.struts.filter.RoutingFilter</filter-class>
        <init-param>
            <param-name>jspDirectAccess</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>requestDumpFilter</filter-name>
        <filter-class>org.seasar.extension.filter.RequestDumpFilter</filter-class>
    </filter>


<!--
    <filter-mapping>
        <filter-name>sessionfilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->


    <filter-mapping>
        <filter-name>encodingfilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


    <filter-mapping>
        <filter-name>hotdeployfilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <filter-mapping>
        <filter-name>s2filter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <filter-mapping>
        <filter-name>routingfilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
    </filter-mapping>

    <filter-mapping>
        <filter-name>requestDumpFilter</filter-name>
        <url-pattern>*.do</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>configFactory</param-name>
            <param-value>org.seasar.struts.config.S2ModuleConfigFactory</param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>2</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>2</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>s2container</servlet-name>
        <servlet-class>org.seasar.framework.container.servlet.S2ContainerServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>s2container</servlet-name>
        <url-pattern>/s2container/*</url-pattern>
    </servlet-mapping>


    <error-page>
        <error-code>500</error-code>
        <location>/login.do</location>
    </error-page>


    <session-config>
        <session-timeout>180</session-timeout>
    </session-config>


    <!--
    <welcome-file-list>
    </welcome-file-list>
    -->

    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jsp</url-pattern>
            <el-ignored>false</el-ignored>
            <page-encoding>UTF-8</page-encoding>
            <scripting-invalid>false</scripting-invalid>
            <include-prelude>/WEB-INF/view/common/common.jsp</include-prelude>
        </jsp-property-group>
    </jsp-config>
</web-app>
user3526499
  • 13
  • 1
  • 7

1 Answers1

0

Class jp.co.colotown.seasar2.filter.SessionFilter is not included in your war file.

It has to be in one of two locations:

  1. WEB-INF/classes/jp/co/colotown/seasar2/filter/SessionFilter.class in the .war file.
  2. jp/co/colotown/seasar2/filter/SessionFilter.class in a .jar file in the WEB-INF/lib of the .war file.

Since both .war files and .jar files are actually .zip files, you can open them using program of your choice, e.g. WinZip, to verify content.

Andreas
  • 154,647
  • 11
  • 152
  • 247
  • Hello , Can you help to team view me .. Current myproject has a problem. SO I think that it can not build to class file ====>>>>>>> ID 168 064 803 pass 2657 – user3526499 Nov 16 '15 at 02:54
  • 1
    @user3526499 No. Look at the .war file and check if the .class file is present. Then look at your build script to see why it is not. – Andreas Nov 16 '15 at 02:56
  • Hello , I look war file and there is no class file which build form source forder ... I think that project stil have any proplem.. Can you help me ? – user3526499 Nov 16 '15 at 03:15