roy_sanu
asked on
errors in the struts application
Hello,
I have a sample program when i try to run using strut2 framework using tomcat7 it gives me error. I have added the right jars of the strut2. i donot know why it did not run and i have set the jars in my lib also.. here is my sample code attached with the list of jars.... and the structure of the package........
can some body able to resolve it
Thanks
error log
========================== ========== ========== ========== ==========
SEVERE: Exception starting filter action
java.lang.NoClassDefFoundE rror: org/apache/commons/lang3/S tringUtils
at com.opensymphony.xwork2.co nfig.provi ders.XmlCo nfiguratio nProvider. register(X mlConfigur ationProvi der.java:2 11)
at org.apache.struts2.config. StrutsXmlC onfigurati onProvider .register( StrutsXmlC onfigurati onProvider .java:102)
at com.opensymphony.xwork2.co nfig.impl. DefaultCon figuration .reloadCon tainer(Def aultConfig uration.ja va:226)
at com.opensymphony.xwork2.co nfig.Confi gurationMa nager.getC onfigurati on(Configu rationMana ger.java:6 7)
at org.apache.struts2.dispatc her.Dispat cher.init_ PreloadCon figuration (Dispatche r.java:429 )
at org.apache.struts2.dispatc her.Dispat cher.init( Dispatcher .java:473)
at org.apache.struts2.dispatc her.ng.Ini tOperation s.initDisp atcher(Ini tOperation s.java:74)
at org.apache.struts2.dispatc her.ng.fil ter.Struts PrepareAnd ExecuteFil ter.init(S trutsPrepa reAndExecu teFilter.j ava:51
++++++++++++++++++++++++++ ++++++++++ ++++++++++ ++++++++++ +++
jars-errorlog.docx
I have a sample program when i try to run using strut2 framework using tomcat7 it gives me error. I have added the right jars of the strut2. i donot know why it did not run and i have set the jars in my lib also.. here is my sample code attached with the list of jars.... and the structure of the package........
can some body able to resolve it
Thanks
error log
==========================
SEVERE: Exception starting filter action
java.lang.NoClassDefFoundE
at com.opensymphony.xwork2.co
at org.apache.struts2.config.
at com.opensymphony.xwork2.co
at com.opensymphony.xwork2.co
at org.apache.struts2.dispatc
at org.apache.struts2.dispatc
at org.apache.struts2.dispatc
at org.apache.struts2.dispatc
++++++++++++++++++++++++++
jars-errorlog.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From where did you pick up Strut2Latest that is seen in the URL?
ASKER
Thanks it is working now
:)
ASKER
but getting another error on strut2 application while running on the tomcat
Here is the error log on the namespaces.
am using the url as
http://localhost:8080/Strut2Latest/tutorials/getTutorial.action
==========================
SEVERE: Exception occurred during processing request: There is no Action mapped for namespace [/] and action name [] associated with context path [/Strut2Latest].
There is no Action mapped for namespace [/] and action name [] associated with context path [/Strut2Latest]. - [unknown location]
at com.opensymphony.xwork2.De
at org.apache.struts2.impl.St
at org.apache.struts2.impl.St
at com.opensymphony.xwork2.De
at org.apache.struts2.dispatc
at org.apache.struts2.dispatc
at org.apache.struts2.dispatc
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.S
at org.apache.catalina.core.S
++++++++++++++++++++++++++
http://localhost:8080/Strut2Latest/tutorials/getTutorial.action
Here is my struts.xml with a namespace and a url above, but i do not have any idea why it gives the above error. let me know if this can be resolved
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" namespace= "/tutorials" extends="struts-default">
<action name="getTutorial" class ="com.tutorial.Tutorialact
<result name ="success">/sucess.jsp</re
</action>
</package>
</struts>
++++++++++++++++++++++++++
Here is my class
==========================
package com.tutorial;
public class Tutorialaction {
public String execute() {
System.out.println(" Hello");
return "success";
}
}
==========================
error-log.docx