Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts basic login application error (jar problem) ?  RSS feed

 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help me out with this. I am new to Struts
I created a basic struts login application, but it is showing the following error. I tried all the solutions from google (each and everyone & almost i wasted an entire day for searching in google & replacing jars. If i replace one jar with other, some new errors are appearing). I tried all the jars but still unable to solve my problem. Now the error i am getting is --->


SEVERE: Exception starting filter struts2
java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider(Lcom/opensymphony/xwork2/config/ConfigurationProvider;)V
at org.apache.struts2.dispatcher.Dispatcher.init_DefaultProperties(Dispatcher.java:285)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:443)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)
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(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Mar 12, 2016 12:46:34 PM 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
Mar 12, 2016 12:46:34 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Struts2Demo] startup failed due to previous errors
Mar 12, 2016 12:46:34 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8088"]
Mar 12, 2016 12:46:34 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Mar 12, 2016 12:46:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 9435 ms

LIST OF JARS I have used :

struts2-json-plugin-2.3.24.1.jar"
struts2-tiles-plugin-2.3.24.1.jar"
tiles-api-2.0.6.jar"
tiles-core-2.0.6.jar"
tiles-jsp-2.0.6.jar"
xwork2.jar"
xwork-core-2.3.12.jar"
antlr-2.7.2.jar"
aopalliance-1.0.jar"
classworlds-1.1.jar"
commons-beanutils-1.7.0.jar"
commons-chain-1.2.jar"
commons-collections-3.2.jar"
commons-digester-2.0.jar"
commons-fileupload-1.2.1.jar"
commons-io-2.2.jar"
commons-lang-2.3.jar"
commons-logging-1.1.3.jar"
commons-logging-api-1.1.jar"
commons-validator-1.3.1.jar"
freemarker-2.3.15.jar"
json-lib-2.1.jar"
mysq.jar"
ognl-2.7.3.jar"
oro-2.0.8.jar"
sslext-1.2-0.jar"
struts2-convention-plugin-2.3.24.1.jar"
struts2-core-2.0.14.jar"
struts2-core-2.1.6.jar"
struts2-core-2.1.8.1.jar"
struts2-core-2.1.8.jar"
struts2-core-2.3.24.1.jar"
struts2-dojo-plugin-2.3.24.1.jar"
struts2-embeddedjsp-plugin-2.3.24.1.jar"


Java Code:

Web.xml



struts.xml :



Login.java



MyInterceptor.java




index.jsp




welcome.jsp








Please help me out as soon as possible.
 
Campbell Ritchie
Marshal
Posts: 55672
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know, but this is too difficult for “beginning” so I shall move you to our Struts forum
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:
struts2-core-2.0.14.jar"
struts2-core-2.1.6.jar"
struts2-core-2.1.8.1.jar"
struts2-core-2.1.8.jar"
struts2-core-2.3.24.1.jar"


More than one version of the same library in the classpath will break things. I posted what the current dependencies for Struts are and how to get them in this topic
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:
Vamsi Kankipati wrote:
struts2-core-2.0.14.jar"
struts2-core-2.1.6.jar"
struts2-core-2.1.8.1.jar"
struts2-core-2.1.8.jar"
struts2-core-2.3.24.1.jar"


More than one version of the same library in the classpath will break things. I posted what the current dependencies for Struts are and how to get them in this topic



Hi Joe, according to you, i removed the same jars and placed only single jars "xwork-core-2.3.24.1.jar" and "struts2-core-2.3.24.1.jar" these are the errors i am getting (errors increased) --->



SEVERE: Dispatcher initialization failed
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
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:584)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
... 33 more
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:155)
at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
... 38 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPath
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 40 more

Mar 14, 2016 5:46:13 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
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:584)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
... 19 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
... 33 more
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:155)
at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
... 38 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPath
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 40 more
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:
Joe Ess wrote:
Vamsi Kankipati wrote:
struts2-core-2.0.14.jar"
struts2-core-2.1.6.jar"
struts2-core-2.1.8.1.jar"
struts2-core-2.1.8.jar"
struts2-core-2.3.24.1.jar"


More than one version of the same library in the classpath will break things. I posted what the current dependencies for Struts are and how to get them in this topic



Hi Joe, according to you, i removed the same jars and placed only single jars "xwork-core-2.3.24.1.jar" and "struts2-core-2.3.24.1.jar" these are the errors i am getting (errors increased) --->



SEVERE: Dispatcher initialization failed
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
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:584)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
... 33 more
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:155)
at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
... 38 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPath
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 40 more

Mar 14, 2016 5:46:13 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)
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:584)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:351)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
... 19 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)
... 33 more
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:155)
at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)
... 38 more
Caused by: java.lang.ClassNotFoundException: javassist.ClassPath
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 40 more





Hi Joe Ess

After replcing the jars these are the jars list you can find and the error is below. As the latest one is 2.3.24.1 , I added all the dependencies as below

javassist-3.11.0.GA.jar"
json-lib-2.3-jdk15.jar"
log4j-api-2.5.jar"
log4j-core-2.5.jar"
struts2-core-2.3.24.1.jar"
struts2-dojo-plugin-2.3.24.1.jar"
struts2-jasperreports-plugin-2.3.24.1.jar"
struts2-struts1-plugin-2.3.24.1.jar"
struts2-tiles-plugin-2.3.24.1.jar"
tiles-jsp-2.0.6.jar"
tiles-ognl-3.0.1.jar"
tiles-request-api-1.0.1.jar"
xwork-core-2.3.24.1.jar"
asm-3.3.jar"
asm-commons-3.3.jar"
commons-fileupload-1.3.1.jar"
commons-io-2.2.jar"
commons-lang-2.4.jar"
commons-lang3-3.2.jar"
commons-logging-1.1.3.jar"
commons-logging-api-1.1.jar"
commons-validator-1.3.1.jar"

but still it is showing below error. In the below error you can find also StrutsPrepareAndExecuteFilter.java is there. But StrutsPrepareAndExecuteFilter is already there in the jar file. Please tell me what to do now ?

Mar 14, 2016 6:54:56 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: ognl/PropertyAccessor
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:342)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:235)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: ognl.PropertyAccessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 25 more
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:
Hi Joe, according to you, i removed the same jars and placed only single jars "xwork-core-2.3.24.1.jar" and "struts2-core-2.3.24.1.jar" these are the errors i am getting (errors increased) --->


Did you follow my link to my other post about the basic dependencies for Struts?

Vamsi Kankipati wrote:
I added all the dependencies as below


Do you need all these dependencies? Are you using Dojo, Tiles or Jasper Reports? Do you have an existing application using Struts 1? If not, you have included unnecessary dependencies, and that can complicate debugging:

struts2-dojo-plugin-2.3.24.1.jar"
struts2-jasperreports-plugin-2.3.24.1.jar"
struts2-struts1-plugin-2.3.24.1.jar"
struts2-tiles-plugin-2.3.24.1.jar"
tiles-jsp-2.0.6.jar"
tiles-ognl-3.0.1.jar"
tiles-request-api-1.0.1.jar"

Vamsi Kankipati wrote:
Mar 14, 2016 6:54:56 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: ognl/PropertyAccessor


Struts depends on OGNL. It's listed in my other post. You need that jar at the very least. I see you missed the dependency on Freemarker too. There's a couple others. Look again at this post for the bare minimum dependencies for Struts.
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:
Vamsi Kankipati wrote:
Hi Joe, according to you, i removed the same jars and placed only single jars "xwork-core-2.3.24.1.jar" and "struts2-core-2.3.24.1.jar" these are the errors i am getting (errors increased) --->


Did you follow my link to my other post about the basic dependencies for Struts?

Vamsi Kankipati wrote:
I added all the dependencies as below


Do you need all these dependencies? Are you using Dojo, Tiles or Jasper Reports? Do you have an existing application using Struts 1? If not, you have included unnecessary dependencies, and that can complicate debugging:

struts2-dojo-plugin-2.3.24.1.jar"
struts2-jasperreports-plugin-2.3.24.1.jar"
struts2-struts1-plugin-2.3.24.1.jar"
struts2-tiles-plugin-2.3.24.1.jar"
tiles-jsp-2.0.6.jar"
tiles-ognl-3.0.1.jar"
tiles-request-api-1.0.1.jar"

Vamsi Kankipati wrote:
Mar 14, 2016 6:54:56 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: ognl/PropertyAccessor


Struts depends on OGNL. It's listed in my other post. You need that jar at the very least. I see you missed the dependency on Freemarker too. There's a couple others. Look again at this post for the bare minimum dependencies for Struts.




Thank you Joe Ess, finally my application is running with the below jars

struts2-core-2.3.24.1.jar"
xwork-core-2.3.24.1.jar"
asm-3.3.jar"
asm-commons-3.3.jar"
commons-fileupload-1.3.1.jar"
commons-io-2.2.jar"
commons-lang-2.4.jar"
commons-lang3-3.2.jar"
commons-logging-1.1.3.jar"
commons-logging-api-1.1.jar"
commons-validator-1.3.1.jar"
freemarker-2.3.22.jar"
javassist-3.11.0.GA.jar"
log4j-api-2.5.jar"
log4j-core-2.5.jar"
ognl-3.0.6.jar"


and the only error i am getting is --->

Mar 15, 2016 6:53:39 PM org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler error
SEVERE: Exception occurred during processing request: null
java.lang.NullPointerException
at com.MyInterceptor.intercept(MyInterceptor.java:18)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:612)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
at java.lang.Thread.run(Unknown Source)


Error after submitting button on page


HTTP Status 500 -

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
com.MyInterceptor.intercept(MyInterceptor.java:18)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.45 logs.
1.PNG
[Thumbnail for 1.PNG]
working page
2.PNG
[Thumbnail for 2.PNG]
error page
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's good news.

Vamsi Kankipati wrote:
java.lang.NullPointerException
com.MyInterceptor.intercept(MyInterceptor.java:18)


So what's going on in line 18 to cause a null pointer exception?
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:That's good news.

Vamsi Kankipati wrote:
java.lang.NullPointerException
com.MyInterceptor.intercept(MyInterceptor.java:18)


So what's going on in line 18 to cause a null pointer exception?


This is line 18 -->

stack.set("name",s.toUpperCase());
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:

stack.set("name",s.toUpperCase());


So what can go wrong on this liine? Have you tried printing out any relevant values? Commenting out this line and seeing what happens?
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:
Vamsi Kankipati wrote:

stack.set("name",s.toUpperCase());


So what can go wrong on this liine? Have you tried printing out any relevant values? Commenting out this line and seeing what happens?



Finally it is working.... I forgot to initialize the string variable with null value, So... null pointer exception.... FINALLY SOLVED..... Application is running perfectly... Thank You Joe Ess for your assistance... Hope to see you in further discussions.

May I know your technical interests please...?

I am learning Struts 2.x, EJB 3.x, Hibernate & Spring..
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:
Finally it is working


Good to hear. One thing I'd like to point out is that this code is relatively fragile. "name" is a fairly common identifier, so there's a chance you may someday introduce another property named the same and ValueStack doesn't give any guarantee which property you will get. Personally, I'd look up "action", which returns you the action for this request and manipulate the property directly.

Vamsi Kankipati wrote:
May I know your technical interests please...?


Professionally, I do Java web development and our application stack looks a lot like your list below. There is a lot of client-side tech too, like HTML, CSS, JavaScript, JQuery, Twitter Bootstrap, etc. My team maintains our own servers, so there's a fair amount of shell scripting, server maintenance, system-level programming, reporting, etc.
Personally, I do some hobby-level robotics, so I use a lot of Python and C.

Vamsi Kankipati wrote:
I am learning Struts 2.x, EJB 3.x, Hibernate & Spring..


This list should be driven by your personal and professional goals (as I said before, this list is a good match for us). It's a good idea to keep an eye on what technologies your local companies are using and the CodeRanch Jobs Forum to see what the larger trends are. The important thing is to remain flexible. The tech industry is constantly changing.
 
Vamsi Kankipati
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:


Professionally, I do Java web development and our application stack looks a lot like your list below. There is a lot of client-side tech too, like HTML, CSS, JavaScript, JQuery, Twitter Bootstrap, etc. My team maintains our own servers, so there's a fair amount of shell scripting, server maintenance, system-level programming, reporting, etc.

This list should be driven by your personal and professional goals (as I said before, this list is a good match for us). It's a good idea to keep an eye on what technologies your local companies are using and the CodeRanch Jobs Forum to see what the larger trends are. The important thing is to remain flexible. The tech industry is constantly changing.


I am learning HTML5, CSS3, AJAX, jQuery, AngularJS, Bootstrap, J2EE Web Services....

Which technologies related to J2EE & client-side according to you are most hot now a days and technologies to be learnt for a bright future in IT career (especially in USA or Canada) ?
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi Kankipati wrote:Which technologies related to J2EE & client-side according to you are most hot now a days and technologies to be learnt for a bright future in IT career (especially in USA or Canada) ?


Joe Ess wrote:This list should be driven by your personal and professional goals. It's a good idea to keep an eye on what technologies your local companies are using and the CodeRanch Jobs Forum to see what the larger trends are. The important thing is to remain flexible. The tech industry is constantly changing.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!