I initially wanted to migrate a JAVA EE project into Maven.
However, I ran into a dispatching error.
I got this stack trace in the file:
C:\Program Files using(x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\My_SERVER\SystemOut.log
:
[22/03/18 07:46:32:755 VET] 00000020 XmlConfigurat I
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
Parsing configuration file [struts-default.xml] [22/03/18 07:46:32:766
VET] 00000020 XmlConfigurat I
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
Parsing configuration file [struts-plugin.xml] [22/03/18 07:46:32:812
VET] 00000020 XmlConfigurat I
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
Parsing configuration file [struts.xml] [22/03/18 07:46:32:814 VET]
00000020 DefaultConfig I
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
Overriding property struts.i18n.reload - old value: false new value:
true [22/03/18 07:46:32:814 VET] 00000020 DefaultConfig I
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
Overriding property struts.configuration.xml.reload - old value: false
new value: true [22/03/18 07:46:32:858 VET] 00000020 Dispatcher E
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
Dispatcher initialization failed
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
at
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51) at
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
at
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:252)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:140)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:509)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:423)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:282)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:340)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:812)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:917)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:924)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:852)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527) Caused by:
java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599) at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
... 40 more Caused by: java.lang.NoClassDefFoundError:
ognl.OgnlRuntime (initialization failure) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:140) at
com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:85)
... 45 more
[22/03/18 07:46:32:860 VET] 00000020 webapp E
com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Erreur du
servlet]-[ognl.OgnlRuntime (initialization failure)] :
java.lang.reflect.InvocationTargetException - Class:
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector File:
ContainerImpl.java Method: inject Line: 295 -
com/opensymphony/xwork2/inject/ContainerImpl.java:295:-1 at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428) at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:140)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:509)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:423)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:282)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:340)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:812)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:917)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:924)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:852)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527) Caused by:
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:295)
at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:431)
at
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51) at
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)
at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
at
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:252)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 27 more Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599) at
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:293)
... 40 more Caused by: java.lang.NoClassDefFoundError:
ognl.OgnlRuntime (initialization failure) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:140) at
com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:85)
... 45 more
[22/03/18 07:46:32:873 VET] 00000020 srt W
com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader WARNING:
Cannot set header. Response already committed. [22/03/18 07:46:32:874
VET] 00000020 srt W
com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader WARNING:
Cannot set header. Response already committed. [22/03/18 07:46:32:875
VET] 00000020 srt W
com.ibm.ws.webcontainer.srt.SRTServletResponse setHeader WARNING:
Cannot set header. Response already committed. [22/03/18 07:46:32:875
VET] 00000020 srt W
com.ibm.ws.webcontainer.srt.SRTServletResponse setDateHeader WARNING:
Cannot set header. Response already committed.
I added this dependency to my pom.xml
(I thought that it's missing):
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.2.1</version>
</dependency>
But I still have the error. Can anyone tell me what I'm missing? Is it perhaps, because I'm using Eclipse NEON1?
I have JDK1.7.0_71 and Websphere 7.0.0.
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_71
MAVEN_HOME=D:\Maven\apache-maven-3.3.9
javassist dependency was messing. I added this dependeny on the POM file :
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
and it works for me.