Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: What is the error is all about ????????????

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What is the error is all about ????????????

    Hi All,

    While running struts programme bean file m coming across below error,

    "
    Struts Problem Report
    Struts has detected an unhandled exception:

    Messages: No result defined for action com.programcreek.struts2.CustpayAction and result input

    File: file:/G:/Eclipse/workspace_new/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Pay/WEB-INF/classes/struts.xml
    Line number: 21
    Column number: 51


    --------------------------------------------------------------------------------


    <action name="customerpay" method="execute"
    class="com.programcreek.struts2.CustpayAction">
    <result name="success">dataaddsucc.jsp</result>
    <result name="error">customerpayment.jsp</result>

    --------------------------------------------------------------------------------

    Stacktraces
    No result defined for action com.programcreek.struts2.CustpayAction and result input - action - file:/G:/Eclipse/workspace_new/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Pay/WEB-INF/classes/struts.xml:21:51
    com.opensymphony.xwork2.DefaultActionInvocation.ex ecuteResult(DefaultActionInvocation.java:345)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:248)
    com.opensymphony.xwork2.validator.ValidationInterc eptor.doIntercept(ValidationInterceptor.java:150)
    org.apache.struts2.interceptor.validation.Annotati onValidationInterceptor.doIntercept(AnnotationVali dationInterceptor.java:48)
    com.opensymphony.xwork2.interceptor.MethodFilterIn terceptor.intercept(MethodFilterInterceptor.java:8 6)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ConversionErro rInterceptor.intercept(ConversionErrorInterceptor. java:123)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ParametersInte rceptor.intercept(ParametersInterceptor.java:161)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.StaticParamete rsInterceptor.intercept(StaticParametersIntercepto r.java:105)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.interceptor.CheckboxInterceptor .intercept(CheckboxInterceptor.java:83)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.interceptor.FileUploadIntercept or.intercept(FileUploadInterceptor.java:207)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ModelDrivenInt erceptor.intercept(ModelDrivenInterceptor.java:74)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ScopedModelDri venInterceptor.intercept(ScopedModelDrivenIntercep tor.java:127)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.interceptor.ProfilingActivation Interceptor.intercept(ProfilingActivationIntercept or.java:107)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.interceptor.debugging.Debugging Interceptor.intercept(DebuggingInterceptor.java:20 6)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ChainingInterc eptor.intercept(ChainingInterceptor.java:115)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.I18nIntercepto r.intercept(I18nInterceptor.java:143)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.PrepareInterce ptor.intercept(PrepareInterceptor.java:115)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.interceptor.ServletConfigInterc eptor.intercept(ServletConfigInterceptor.java:170)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.AliasIntercept or.intercept(AliasInterceptor.java:123)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    com.opensymphony.xwork2.interceptor.ExceptionMappi ngInterceptor.intercept(ExceptionMappingIntercepto r.java:176)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:219)
    com.opensymphony.xwork2.DefaultActionInvocation$2. doProfiling(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.util.profiling.UtilTimerSt ack.profile(UtilTimerStack.java:455)
    com.opensymphony.xwork2.DefaultActionInvocation.in voke(DefaultActionInvocation.java:216)
    org.apache.struts2.impl.StrutsActionProxy.execute( StrutsActionProxy.java:50)
    org.apache.struts2.dispatcher.Dispatcher.serviceAc tion(Dispatcher.java:507)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:421)
    org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:864)
    org.apache.coyote.http11.Http11AprProtocol$Http11C onnectionHandler.process(Http11AprProtocol.java:57 9)
    org.apache.tomcat.util.net.AprEndpoint$Worker.run( AprEndpoint.java:1600)
    java.lang.Thread.run(Unknown Source)


    --------------------------------------------------------------------------------

    You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:

    struts.devMode=false

    in your WEB-INF/classes/struts.properties file. "

    My bean class as per below ,


    package com.programcreek.struts2;

    import java.util.Date;
    import java.sql.*;

    import com.opensymphony.xwork2.ActionSupport;

    public class CustpayAction extends ActionSupport{

    private String saccno;
    private Date date;
    private String cusamt;
    private String cuscurrency;
    private String cusname;
    private String cusbankname;
    private String cusbankbrname;
    private String cusaccno;
    private String cusifsc;
    private String cusaddinfo;

    public String execute() throws Exception {

    String url = "jdbc:mysql://localhost:3306/";
    String dbName = "paysys";
    String driver = "com.mysql.jdbc.Driver";
    String username = "root";
    String userPassword = "java";
    Connection conn=null;
    Statement stmt=null;

    try {

    Class.forName(driver).newInstance();
    conn = DriverManager.getConnection(url+dbName,username,us erPassword);
    stmt = conn.createStatement();

    } catch(Exception e) {
    e.printStackTrace();
    }

    String accn = getAccountno();
    Date dt = getDate();
    String cpamount= getCusamt();
    String cpcurr = getCuscurrency();
    String cpcusn = getCusname();
    String cpcusbn = getCusbankname();
    String cpcusbbn = getCusbankbrname();
    String cpcusac = getCusaccno();
    String cpcusif = getCusifsc();
    String cpadif = getCusaddinfo();
    stmt = conn.createStatement();
    int val = stmt.executeUpdate("insert into custpaytransaction values ('"+accn+"','"+dt+"','"+cpamount+"','"+cpcurr+"',' "+cpcusn+"','"+cpcusbn+"','"+cpcusbbn+"','"+cpcusa c+"','"+cpcusif+"','"+cpadif+"')");

    if(val == 0){
    return ERROR;
    }
    else{
    return SUCCESS;
    }
    }


    public String getAccountno() {
    return saccno;
    }

    public void setAccountno(String value) {
    this.saccno = value;
    }

    public Date getDate(){
    return date;
    }

    public void setDate(Date value){
    this.date = value;
    }

    public String getCusamt(){
    return cusamt;
    }

    public void setCusamt(String value){
    this.cusamt = value;
    }

    public String getCuscurrency(){
    return cuscurrency;
    }

    public void setCuscurrency(String value) {
    this.cuscurrency = value;
    }

    public String getCusname(){
    return cusname;
    }

    public void setCusname(String value){
    this.cusname = value;
    }

    public String getCusbankname(){
    return cusbankname;
    }

    public void setCusbankname(String value){
    this.cusbankname = value;
    }

    public String getCusbankbrname(){
    return cusbankbrname;
    }

    public void setCusbankbrname(String value){
    this.cusbankbrname = value;
    }

    public String getCusifsc(){
    return cusifsc;
    }

    public void setCusifsc(String value){
    this.cusifsc = value;
    }

    public String getCusaccno(){
    return cusaccno;
    }

    public void setCusaccno(String value){
    this.cusaccno = value;
    }

    public String getCusaddinfo(){
    return cusaddinfo;
    }

    public void setCusaddinfo(String value){
    this.cusaddinfo = value;
    }

    }


    Pls advise solution on this asap.

    Rgds,
    Rajiv


  2. #2
    Member
    Join Date
    Aug 2011
    Posts
    48
    My Mood
    Fine
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default Re: What is the error is all about ????????????

    <action name="customerpay" method="execute"
    class="com.programcreek.struts2.CustpayAction">
    <result name="success">dataaddsucc.jsp</result>
    <result name="error">customerpayment.jsp</result>
    You are missing the input element for your action class. You should correct as follow:

    <action name="customerpay" method="execute"
    class="com.programcreek.struts2.CustpayAction">
    <result name="success">dataaddsucc.jsp</result>
    <result name="error">customerpayment.jsp</result>
    <result name="input">customerpayment.jsp</result>

    When Struts validates your form and found error, it will return to the page that is defined by:

    <result name="input">

    immutable objects
    Last edited by ha.minh.nam; December 4th, 2011 at 07:27 PM.