Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem in integrating with Struts

    I am working on a struts 1.1 environment and I want to integrate smart client on it. I am now trying to use the RPCManager in my action to get the DSRequest and DSResponse. In my code I have

    My data source is defined in my JSP:

    Code:
    
    isc.defineClass("Box", "Label").addProperties({
        align:"center",
    
    })
    
    isc.HLayout.create({
        width:"100%", height:"100%", membersMargin:20,
    
        members:[
    
            isc.HLayout.create({
                showEdges:false,
                height:150, membersMargin:30,  layoutMargin:10,
                members:[
                    isc.Box.create({width:300, contents:""}),
    
    
    
    
                    DynamicForm.create({
    		     ID: "clmListingForm",
    		     autoDraw: false,
    		     showEdges:false,
    		     width:"*",
    		     numCols:2,
    		     colWidths: [60, "*"],
    		     validationURL: "/rvqueryclm/Validation.do",
    		     action: "/rvqueryclm/generateReportVQueryClm.do",
    		     submitParamsOnly: true,
    		     fields : [
    		         { type:"header", defaultValue:"CLM LISTING", align:"center"},
    
    
    
    		         { name:"railcars", title: "RailCar(s)",
    		           type: "textArea", length: 30,  colSpan: 2},
    
    		         { name:"fromEventDate", title: "Event Date From",align:"left",wrapTitle: false,
    		           type: "text", length: 200, type: "date", length: 60, useTextField:"true", colSpan: 2},
    
    		         { name:"toEventDate", title: "Event Date To",wrapTitle: false,
    		           type: "text", length: 200, type: "date", length: 60, useTextField:"true", colSpan: 2},
    
    		         { name:"systemDateTimeFrom", title: "System Date Time From", type: "date", length: 60,wrapTitle: false,
    		         useTextField:"true", colSpan: 2},
    
    		         { name:"systemDateTimeTo", title: "System Date Time To",wrapTitle: false,wrapTitle: false,
    		           type: "text", length: 200, type: "date", length: 60, useTextField:"true", colSpan: 2},
    
    		         { name:"carrier", title: "Carrier",wrapTitle: false,
    		           type: "text", length: 200, colSpan: 2},
    
    		         { name:"trainId", title: "Train ID",wrapTitle: false,
    		           type: "text", length: 20, colSpan: 2},
    
    		         { name:"eventCode", title: "Event Code",wrapTitle: false,
    		           type: "text", length: 20, colSpan: 2},
    
    		         { name:"resultsPerPage", title: "# of results per page",wrapTitle: false,
    		           type: "text", length: 60, colSpan: 2},
    
    		         { name:"sightingCode", title: "Sighting Code",wrapTitle: false,
    		           type: "text", length: 25, colSpan: 2},
    
    		         { name:"destination", title: "Destination",wrapTitle: false,
    		           type: "text", length: 20, colSpan: 2},
    
    
    		         { name:"eventLocation", title: "Event Location",wrapTitle: false,
    		           type: "text", length: 20, colSpan: 2},
    
    		          {name: "search", title: "Search", type: "button",colSpan: 2,width: 50, align:"center",click: "clmListingForm.submitForm()"},
    
    		     ]
     }),
    
    
    
                    isc.Box.create({width:"30%", contents:""})
                ]
            })
        ]
    })


    Then i use "clmListingForm.submitForm()" to submit the data to my action.


    In my action I have the following in my execute method

    Code:
    RPCManager manager = new RPCManager(request, response);

    When this line is reached I get an exception


    Code:
    RPCManager manager = new RPCManager(request, response);
    When this line is reached I get an exception


    Code:
    java.lang.Exception: Non-RPC request ignored.

    I tried with

    Code:
      RPCManager.addProperties({ actionURL: "/rvqueryclm/generateReportVQueryClm.do"});
    in my JSP but still gets the same exception.

    I cannot figure out why the RPCManager does not see this as an RPC request in struts action class? Am I missing a step or am I doing something wrong.

    #2
    We are having the same issues, not using struts specifically...

    Did you ever get an answer on this?

    We are using Apache/mod_jk/JBoss and pumping all requests through Apache for all static content and speed. It is VERY fast, however, all the middleware RPC communication now fails.

    Please advise, here is the error message.

    We are getting:

    Code:
    Throwing an exception after calling RPCManager constructor!!!!!!!!!!!!!!!!!!!!!!
    09:17:06,126 INFO  [STDOUT] Non-RPC request ignored.
    09:17:06,126 INFO  [STDOUT] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    09:17:06,126 INFO  [STDOUT] === 2008-05-22 09:17:06,126 [09-1] ERROR Compression - Caught exception in doFilter() - for URI: /dev/ACES/lookup
    java.lang.RuntimeException: Non-RPC request ignored.
    	at com.ray.aces.AjaxServlet.doPost(Unknown Source)
    	at com.ray.aces.AjaxServlet.doGet(Unknown Source)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    	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:230)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
    	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    	at java.lang.Thread.run(Unknown Source)
    -Sebastian

    Comment


      #3
      This exception is thrown when the SmartClient server's RPC Manager does not recognise the HttpServletRequest passed to it as being a SmartClient RPC request. In the original poster's case, this was because he was using submitForm() to contact the server, which just sends an ordinary GET or POST like a traditional web application.

      We'd need more info to able to work out why its happening in your case.

      Comment

      Working...
      X