1
I’m using struts2
+ spring4
server-based jboss 7.1
on my application.
As reported in the title, I’m not getting up the application because the listeners
They’re not being squeezed. Someone can tell me what could be the problem, I have already searched the internet, but the errors are versioning the dependencies, this is not my case. Below I will put my settings:
web xml.
`<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0" 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 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>GVTEC-Gerenciador</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>DispatcherFilter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>DispatcherFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>`
Error:
11:07:12,821 WARN [org.jboss.as.ee] (MSC service thread 1-4) JBAS011006: Not Installing optional Component org.apache.struts2.dispatcher.ng.filter.Strutsprepareandexecutefilter due to Exception: java.lang.Classnotfoundexception: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter from [Module "deployment.GVTEC-Gerenciador.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA] at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79] at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79] at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.1.1.Final. jar:7.1.1.Final] at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final. jar:7.1.1.Final] at org.jboss.Msc.service.Servicecontrollerimpl$Starttask.startService(Servicecontrollerimpl.java:1811) [jboss-Msc-1.0.2.GA. jar:1.0.2.GA] at org.jboss.Msc.service.Servicecontrollerimpl$Starttask.run(Servicecontrollerimpl.java:1746) [jboss-Msc-1.0.2.GA. jar:1.0.2.GA] at java.util.Concurrent.ThreadPoolExecutor.runWorker(Threadpoolexecutor.java:1145) [rt.jar:1.7.0_79] at java.util.Concurrent.Threadpoolexecutor$Worker.run(Poolexecutor.java:615) [rt.jar:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79] 11:07:12,829 WARN [org.jboss.as.ee] (MSC service thread 1-4) JBAS011006: Not installing optional component org.springframework.web.context.ContextLoaderListener due to exception: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.GVTEC-Gerenciador.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.loadClass(Concurrentclassloader.java:120) [jboss-modules.jar:1.1.1.GA] at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79] at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79] at org.jboss.as.server.Deployment.reflect.Deploymentclassindex.classIndex(Deploymentclassindex.java:54) [jboss-as-server-7.1.1.Final. jar:7.1.1.Final] at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:79) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final. jar:7.1.1.Final] at org.jboss.Msc.service.Servicecontrollerimpl$Starttask.startService(Servicecontrollerimpl.java:1811) [jboss-Msc-1.0.2.GA. jar:1.0.2.GA] at org.jboss.Msc.service.Servicecontrollerimpl$Starttask.run(Servicecontrollerimpl.java:1746) [jboss-Msc-1.0.2.GA. jar:1.0.2.GA] at java.util.Concurrent.ThreadPoolExecutor.runWorker(Threadpoolexecutor.java:1145) [rt.jar:1.7.0_79] at java.util.Concurrent.Threadpoolexecutor$Worker.run(Poolexecutor.java:615) [rt.jar:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79] 11:07:13,114 ERROR [org.apache.Containerbase. [jboss.web]. [default-host]. [/GVTEC-Gerenciador]] (MSC service thread 1-4) Error configuring application listener of class org.springframework.web.context.ContextLoaderListener: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.GVTEC-Gerenciador.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadassChecked(Concurrentclassloader.java:456)"}}}} ------------------------------------------------------------------------
Hail! From your log, I find it interesting that you try to remedy the problem of Classnotfound with the class org.apache.struts2.dispatcher.ng.filter.Strutsprepareandexecutefilter to then understand what may be happening. This dependency can be in the Jboss modules or even within your application.
– Ricardo Zanini
Can you post your dependencies? It seems that in Struts 2.5 you changed the class name without "ng". See: http://struts.apache.org/docs/version-notes-25.html anyway take a look at the container’s classpath to see if the dependency is ok.
– Ricardo Zanini