0

Struts 2.0.8から2.3.15.2にアップグレードしました

Apache Tomcat サーバーを起動すると、以下のエラーが発生します。

クラス org.apache.struts2.tiles.StrutsTilesListener のリスナー インスタンスにコンテキスト初期化イベントを送信する例外

**INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
Oct 16, 2013 1:03:07 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class 
org.apache.struts2.tiles.StrutsTilesListener
java.lang.NullPointerException
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at     org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:267)**


WEB-INF/lib フォルダーで次の jar ファイルを使用しています

commons-beanutils-1.8.0.jar
commons-codec-1.6.jar
commons-collections-3.1.jar
commons-dbcp.jar
commons-digester-2.0.jar
commons-fileupload-1.3.jar
commons-io-2.0.1.jar
commons-lang-2.4.jar
commons-logging-1.1.3.jar
commons-pool-1.6.jar
crimson.jar
displaytag-1.1.jar
displaytag-export-poi-1.1.jar
fluent-hc-4.2.3.jar
freemarker-2.3.19.jar
httpclient-4.2.3.jar
httpclient-cache-4.2.3.jar
httpcore-4.2.2.jar
httpmime-4.2.3.jar
itext-2.0.4.jar
javax.mail_1.4.0.v201005080615.jar
jstl.jar
log4j-12.jar
mail.jar
ognl-3.0.6.jar
ojdbc6.jar
poi-3.0.1-FINAL-20070705.jar
standard.jar
struts2-core-2.3.15.2.jar
struts2-tiles3-plugin-2.3.15.2.jar
struts2-tiles-plugin-2.3.15.2.jar
struts-core-1.3.10.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
xwork-core-2.3.15.2.jar


WEB.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4" 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">

<display-name>My Web Application</display-name>

<filter>
    <filter-name>struts-cleanup</filter-name>
    <filter-class>
        org.apache.struts2.dispatcher.ActionContextCleanUp
    </filter-class>
</filter>

<filter-mapping>
    <filter-name>struts-cleanup</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
    <filter-name>struts2</filter-name>
    <filter-class>
        org.apache.struts2.dispatcher.FilterDispatcher
    </filter-class>
</filter>
<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
    <filter-name>ResponseOverrideFilter</filter-name>
    <filter-class>
        org.displaytag.filter.ResponseOverrideFilter
    </filter-class>
</filter>

<filter-mapping>
    <filter-name>ResponseOverrideFilter</filter-name>
    <url-pattern>*.action</url-pattern>
</filter-mapping>

<listener>
    <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>

<listener>
    <listener-class>com.comp.ccra.listener.CCRAContextListener</listener-class>
</listener>

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>


STRUTS.xml

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
<package name="ccra" extends="struts-default" >
    <interceptors>
        <interceptor name="login" class="com.comp.ccra.action.interceptor.LoginInterceptor"/>
        <interceptor-stack name="defaultLoginStack">
            <interceptor-ref name="login"></interceptor-ref>
            <interceptor-ref name="defaultStack"></interceptor-ref>
        </interceptor-stack>
    </interceptors> 
    <!-- Make the defaultLoginStack the default one used
     for all actions unless otherwise configured. -->
    <default-interceptor-ref name="defaultLoginStack" />
    <global-results>
        <result name="exception">/WEB-INF/jsp/exception.jsp</result>
    </global-results>       
    <global-exception-mappings>
        <exception-mapping exception="org.apache.tomcat.dbcp.dbcp.SQLNestedException" result="exception"/>
        <exception-mapping exception="javax.servlet.ServletException" result="exception"/>
        <exception-mapping exception="java.sql.SQLException" result="exception"/>
        <exception-mapping exception="java.lang.Exception" result="exception"/>
    </global-exception-mappings>
 </package>
<include file="struts-filedownload.xml" />
<include file="struts-fileupload.xml" />
<include file="struts-common.xml" />
<include file="struts-report.xml" />
<include file="struts-admin.xml" />
</struts>


タイル.xml

<!DOCTYPE tiles-definitions PUBLIC
   "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
   "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

<!-- Definitions for Tiles documentation   -->

<tiles-definitions>

<!-- =======================================================  -->
<!-- Master definition                      -->
<!-- =======================================================  -->

<definition name="basicLayout" template="/WEB-INF/tiles/layout/basicLayout.jsp">
<put-attribute name="title"  value="Call Center Connection (C3)"/>
<put-attribute name="header" type="template" value="/WEB-INF/tiles/layout/header.jsp"/>
<put-attribute name="navigation" type="template" value="/WEB-INF/tiles/layout/navigation.jsp"/>
<put-attribute name="body" type="template" value="/WEB-INF/tiles/layout/empty.jsp"/>
<put-attribute name="info" type="template" value="/WEB-INF/tiles/layout/info.jsp"/>
<put-attribute name="footer" type="template" value="/WEB-INF/tiles/layout/footer.jsp"/>
</definition>

<definition name="homePage" extends="basicLayout" >
</definition>

</tiles-definitions>



ここで何か間違ったことをしている場合は提案してください。どんな助けでも大歓迎です。

4

1 に答える 1