前提・実現したいこと
Eclips,Springを使って、Java,jspを勉強している初心者です。
現在、Eclips内のサーバーを起動すると、「org.springframework.web.context.ContextLoaderListener
のリスナインスタンスにコンテキスト初期化イベントを送信中の例外です」とエラーが発生してしまいます。
web.xmlに問題がありそうかなとも思うのですが、Eclips,Springで自動生成したものなので、そこは大丈夫だと思っています。
まずは「org.springframework.web.context.ContextLoaderListener 」が何でどこにあるものなのか
調べようとしているのですが「WebアプリケーションのContextをロードするためのサーブレット・リスナー」
だということ以外、ネットで調べてもいまいちよく分かりません。
どこを調べればよいのかご教授いただけないでしょうか。
発生している問題・エラーメッセージ
重大: クラス org.springframework.web.context.ContextLoaderListener のリスナインスタンスにコンテキスト初期化イベントを送信中の例外です [水 7 31 10:13:51 JST 2019] 重大: One or more listeners failed to start. Full details will be found in the appropriate container log file [水 7 31 10:13:51 JST 2019] 重大: 以前のエラーのためにコンテキストの起動が失敗しました [/address] [水 7 31 10:13:51 JST 2019] 情報: Closing Spring root WebApplicationContext [水 7 31 10:13:51 JST 2019] INFO : org.springframework.web.context.support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Wed Jul 31 10:13:50 JST 2019]; root of context hierarchy WARN : org.springframework.web.context.support.XmlWebApplicationContext - Exception thrown from LifecycleProcessor on context close java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Wed Jul 31 10:13:50 JST 2019]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:583) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:116) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159) 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(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 重大: クラス org.springframework.web.context.ContextLoaderListener のリスナインスタンスにコンテキスト破棄イベントを送信中の例外です [水 7 31 10:13:51 JST 2019] 情報: Starting ProtocolHandler ["http-nio-8080"] [水 7 31 10:13:51 JST 2019] 情報: Starting ProtocolHandler ["ajp-nio-8009"] [水 7 31 10:13:51 JST 2019] 情報: Server startup in 2603 ms [水 7 31 10:13:51 JST 2019]
該当のソースコード
WEB.INF <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- The definition of the Root Spring Container shared by all Servlets and Filters --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/root-context.xml</param-value> </context-param> <!-- Creates the Spring Container shared by all Servlets and Filters --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- Processes application requests --> <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/appServlet/servlet-context.xml </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>appServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app>
【2019.9.1】
別の質問で解決したので、クローズします。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。