You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sathish Babu K R <kr...@yahoo.com> on 2003/12/04 06:05:11 UTC

from sathish

hi all

while access to the action class,i m getting the error
as 

java.lang.NoSuchMethodError at
com.pronto.web.ModifyGWQueuesAction.perform(Unknown
Source) at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:602)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:308)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:479) 

the action class is

package com.pronto.web ;

import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import javax.ejb.Handle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import
com.pronto.gateway.IPGConfigurationManagerRemote;
import com.pronto.gateway.PGQueueVO;
import com.pronto.util.Debug;

public final class ModifyGWQueuesAction extends Action
{

    public ActionForward perform(ActionMapping
mapping,
				 ActionForm form,
				 HttpServletRequest request,
				 HttpServletResponse response)
	throws IOException, ServletException {

		HttpSession session = request.getSession();
		ModifyGWQueuesForm theForm =
(ModifyGWQueuesForm)form;

		long x=1,y=2,z=3;
		String b1="N",b2="N",b3="N";
		float abw1=1,abw2=1,abw3=1;
		boolean msg=true;

		String button=request.getParameter("Management");
		Debug.print("ModifyGWQueuesAction : perform() --
Button Clicked: " + button);
		
		if("Save".equals(button))
		{
			String queuename = theForm.getqueuename();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name1 : " + queuename);
		
			String queuename1 = theForm.getqueuename1();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name2 : " + queuename1);
		
			String queuename2 = theForm.getqueuename2();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name3 : " + queuename2);

			String queuebandwidth =
theForm.getqueuebandwidth();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth1 : " + queuebandwidth);
			abw1=(new Float(queuebandwidth)).floatValue();
		
			String queuebandwidth1 =
theForm.getqueuebandwidth1();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth2 : " + queuebandwidth1);
			abw2=(new Float(queuebandwidth1)).floatValue();

			String queuebandwidth2 =
theForm.getqueuebandwidth2();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth3 : " + queuebandwidth2);
			abw3=(new Float(queuebandwidth2)).floatValue();
		
			String queue = theForm.getqueue();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 1 : " + queue);
		
			String queue1 = theForm.getqueue1();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 2 : " + queue1);
			
			String queue2 = theForm.getqueue2();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 3 : " + queue2);

			String queuelist = theForm.getqueuelist();
			Debug.print("ModifyGWQueuesAction : perform() --
borrow: " + queuelist);
		
			Long check=new Long(queuelist);
			int check1=check.intValue();
			switch(check1)
			{
				case 1:
					b1="Y";
					queue="Y";
					break;
				case 2:
					b2="Y";
					queue1="Y";
					break;
				case 3:
					b3="Y";
					queue2="Y";
					break;
			}
			
			PGQueueVO pgqueuevo1=new
PGQueueVO(x,queuename,b1,queue,abw1);
			PGQueueVO pgqueuevo2=new
PGQueueVO(y,queuename1,b2,queue1,abw2);
			PGQueueVO pgqueuevo3=new
PGQueueVO(z,queuename2,b3,queue2,abw3);

			try{

				Handle
handle=(Handle)session.getAttribute(WebConstants.CONFIG_MGR);
				IPGConfigurationManagerRemote
remote1=(IPGConfigurationManagerRemote)handle.getEJBObject();

				Long
gatewayid=(Long)session.getAttribute(WebConstants.GATEWAY_ID);
				Debug.print("ModifyGWQueuesAction : perform() --
Gateway Id : "+gatewayid);
				remote1.setCurrentGateway(gatewayid.longValue());
		
				String
visiting=(String)session.getAttribute("queuemodify");
				Debug.print("ModifyGWQueuesAction : perform() --
visiting for : " + visiting);
				if("TOSETUP".equals(visiting))
				{
					msg=remote1.addQueue(pgqueuevo1);
					msg=remote1.addQueue(pgqueuevo2);
					msg=remote1.addQueue(pgqueuevo3);
				}
				else if("TOMODIFY".equals(visiting))
				{
					Collection queues = new ArrayList();
					queues.add(pgqueuevo1);
					queues.add(pgqueuevo2);
					queues.add(pgqueuevo3);
					boolean
modifyresult=remote1.modifyQueues(queues);
				}
				
			
			}catch(Exception e)
			{
				Debug.print(e);
			}
		
session.setAttribute("page","SearchControllerMain");
		}
		else if("Abort".equals(button))
		{
			request.setAttribute("id","2.2");
		
session.setAttribute("page","SearchControllerMain");
		}

		
		return (mapping.findForward("success"));
    }
}

can anyone tell me the reason for error

regards
sathish




__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: from sathish

Posted by David Friedman <hu...@ix.netcom.com>.
Sathish,

So, you're using Struts (version 1.0?) and your method
signature wasn't working.  When you changed it to
the one I pulled off the struts web site's api, did it
work?

Regards,
David

-----Original Message-----
From: Sathish Babu K R [mailto:krsathi@yahoo.com]
Sent: Friday, December 05, 2003 3:58 AM
To: Struts Users Mailing List
Subject: from sathish


hi david

i get session using request.getSession()?y whats  in
it?tell me.

sathish

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


from sathish

Posted by Sathish Babu K R <kr...@yahoo.com>.
hi david

i get session using request.getSession()?y whats  in
it?tell me.

sathish

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: from sathish

Posted by David Friedman <hu...@ix.netcom.com>.
Sathish,

Did you resolve your problem yesterday?

If not, how do you request a session?
request.getSession() and request.getSession(true)?

Regards,
David

-----Original Message-----
From: Sathish Babu K R [mailto:krsathi@yahoo.com]
Sent: Thursday, December 04, 2003 12:30 AM
To: Struts Users Mailing List
Subject: from sathish


hi david

when i used ur signature

i m not able to get session from ur request.thatz
creating probs.tell me any other sugg

regards
sathish

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


from sathish

Posted by Sathish Babu K R <kr...@yahoo.com>.
hi david

when i used ur signature

i m not able to get session from ur request.thatz
creating probs.tell me any other sugg

regards
sathish

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


from sathish

Posted by Sathish Babu K R <kr...@yahoo.com>.
hi david

i m using the same method signature for all action
classes.all files works fine except this.that is i m
using HttpServletRequest and HttpServletResponse in
all files but u have asked me to put ServletRequest
and ServletResponse.is it right?

sathish

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: from sathish

Posted by David Friedman <hu...@ix.netcom.com>.
Sathish,

Your method signature seems incorrect.  According to the javadocs (v1.0),
perform (which is deprecated) requires the following argument types:

public ActionForward perform(ActionMapping mapping,
                             ActionForm form,
                             javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response)
                      throws java.io.IOException,
                             javax.servlet.ServletException

-David

-----Original Message-----
From: Sathish Babu K R [mailto:krsathi@yahoo.com]
Sent: Thursday, December 04, 2003 12:05 AM
To: struts-user@jakarta.apache.org
Subject: from sathish


hi all

while access to the action class,i m getting the error
as

java.lang.NoSuchMethodError at
com.pronto.web.ModifyGWQueuesAction.perform(Unknown
Source) at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j
ava:602)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis
patcher.java:308)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
779)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for
J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourceP
ooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:479)

the action class is

package com.pronto.web ;

import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import javax.ejb.Handle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import
com.pronto.gateway.IPGConfigurationManagerRemote;
import com.pronto.gateway.PGQueueVO;
import com.pronto.util.Debug;

public final class ModifyGWQueuesAction extends Action
{

    public ActionForward perform(ActionMapping
mapping,
				 ActionForm form,
				 HttpServletRequest request,
				 HttpServletResponse response)
	throws IOException, ServletException {

		HttpSession session = request.getSession();
		ModifyGWQueuesForm theForm =
(ModifyGWQueuesForm)form;

		long x=1,y=2,z=3;
		String b1="N",b2="N",b3="N";
		float abw1=1,abw2=1,abw3=1;
		boolean msg=true;

		String button=request.getParameter("Management");
		Debug.print("ModifyGWQueuesAction : perform() --
Button Clicked: " + button);

		if("Save".equals(button))
		{
			String queuename = theForm.getqueuename();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name1 : " + queuename);

			String queuename1 = theForm.getqueuename1();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name2 : " + queuename1);

			String queuename2 = theForm.getqueuename2();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Name3 : " + queuename2);

			String queuebandwidth =
theForm.getqueuebandwidth();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth1 : " + queuebandwidth);
			abw1=(new Float(queuebandwidth)).floatValue();

			String queuebandwidth1 =
theForm.getqueuebandwidth1();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth2 : " + queuebandwidth1);
			abw2=(new Float(queuebandwidth1)).floatValue();

			String queuebandwidth2 =
theForm.getqueuebandwidth2();
			Debug.print("ModifyGWQueuesAction : perform() --
Queue Bandwidth3 : " + queuebandwidth2);
			abw3=(new Float(queuebandwidth2)).floatValue();

			String queue = theForm.getqueue();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 1 : " + queue);

			String queue1 = theForm.getqueue1();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 2 : " + queue1);

			String queue2 = theForm.getqueue2();
			Debug.print("ModifyGWQueuesAction : perform() --
isolated 3 : " + queue2);

			String queuelist = theForm.getqueuelist();
			Debug.print("ModifyGWQueuesAction : perform() --
borrow: " + queuelist);

			Long check=new Long(queuelist);
			int check1=check.intValue();
			switch(check1)
			{
				case 1:
					b1="Y";
					queue="Y";
					break;
				case 2:
					b2="Y";
					queue1="Y";
					break;
				case 3:
					b3="Y";
					queue2="Y";
					break;
			}

			PGQueueVO pgqueuevo1=new
PGQueueVO(x,queuename,b1,queue,abw1);
			PGQueueVO pgqueuevo2=new
PGQueueVO(y,queuename1,b2,queue1,abw2);
			PGQueueVO pgqueuevo3=new
PGQueueVO(z,queuename2,b3,queue2,abw3);

			try{

				Handle
handle=(Handle)session.getAttribute(WebConstants.CONFIG_MGR);
				IPGConfigurationManagerRemote
remote1=(IPGConfigurationManagerRemote)handle.getEJBObject();

				Long
gatewayid=(Long)session.getAttribute(WebConstants.GATEWAY_ID);
				Debug.print("ModifyGWQueuesAction : perform() --
Gateway Id : "+gatewayid);
				remote1.setCurrentGateway(gatewayid.longValue());

				String
visiting=(String)session.getAttribute("queuemodify");
				Debug.print("ModifyGWQueuesAction : perform() --
visiting for : " + visiting);
				if("TOSETUP".equals(visiting))
				{
					msg=remote1.addQueue(pgqueuevo1);
					msg=remote1.addQueue(pgqueuevo2);
					msg=remote1.addQueue(pgqueuevo3);
				}
				else if("TOMODIFY".equals(visiting))
				{
					Collection queues = new ArrayList();
					queues.add(pgqueuevo1);
					queues.add(pgqueuevo2);
					queues.add(pgqueuevo3);
					boolean
modifyresult=remote1.modifyQueues(queues);
				}


			}catch(Exception e)
			{
				Debug.print(e);
			}

session.setAttribute("page","SearchControllerMain");
		}
		else if("Abort".equals(button))
		{
			request.setAttribute("id","2.2");

session.setAttribute("page","SearchControllerMain");
		}


		return (mapping.findForward("success"));
    }
}

can anyone tell me the reason for error

regards
sathish




__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org