jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanket Desai" <sde...@firstgenetic.net>
Subject RE: Passing argument to Cactus using servlet
Date Thu, 23 Dec 2004 20:26:35 GMT
No probs vincent.

I googled & found that I needed latest binary of cactus.

I downloaded & that problem disappeared.

Thanks anyways for help. 


Regards,
 
Sanket Desai

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: Thursday, December 23, 2004 3:25 PM
To: 'Cactus Users List'
Subject: RE: Passing argument to Cactus using servlet

I don't know. 

Sounds more like a strutstestcase issue to me (maybe it's doing something in
teardown() or setUp() that causes this pb). I've never heard of any such problem with Cactus.

-Vincent

> -----Original Message-----
> From: Sanket Desai [mailto:sdesai@firstgenetic.net]
> Sent: jeudi 23 d├ęcembre 2004 21:07
> To: Cactus Users List
> Subject: RE: Passing argument to Cactus using servlet
> 
> Vincent,
> 
> Now that I've resolved parameter issue with the servlet, I've another 
> issue.
> 
> When I try & call Cactus servlet 1st time, it works fine. But when I 
> call it the 2nd tim e (again thru Jmeter), I get NullPointerException ::
> 
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:389)
>         at
> weblogic.servlet.internal.WebAppServletContext.setAttribute(WebAppServ
> letC
> ontext.java:669)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.dispatch69_setA
> ttri 
> bute(AbstractServletContextWrapper.java;org/apache/cactus/util/log/Log
> Aspe
> ct.aj(1k):126)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.around69_setAtt
> ribu 
> te(AbstractServletContextWrapper.java;org/apache/cactus/util/log/LogAs
> pect
> .aj(1k):1156)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.setAttribute(Ab
> stra
> ctServletContextWrapper.java;org/apache/cactus/util/log/LogAspect.aj(1
> k):1
> 24)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.dispatch69_setA
> ttri 
> bute(AbstractServletContextWrapper.java;org/apache/cactus/util/log/Log
> Aspe
> ct.aj(1k):126)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.around69_setAtt
> ribu 
> te(AbstractServletContextWrapper.java;org/apache/cactus/util/log/LogAs
> pect
> .aj(1k):1156)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.setAttribute(Ab
> stra
> ctServletContextWrapper.java;org/apache/cactus/util/log/LogAspect.aj(1
> k):1
> 24)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.dispatch69_setA
> ttri 
> bute(AbstractServletContextWrapper.java;org/apache/cactus/util/log/Log
> Aspe
> ct.aj(1k):126)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.around69_setAtt
> ribu 
> te(AbstractServletContextWrapper.java;org/apache/cactus/util/log/LogAs
> pect
> .aj(1k):1156)
>         at
> org.apache.cactus.server.AbstractServletContextWrapper.setAttribute(Ab
> stra
> ctServletContextWrapper.java;org/apache/cactus/util/log/LogAspect.aj(1
> k):1
> 24)
>         at
> servletunit.struts.CactusStrutsTestCase.getActionServlet(CactusStrutsT
> estC
> ase.java:400)
> 
> 
> 
> Looking at the exception above it appears to me that the context 
> didn't get initialized or may be I'm missing something in the tearDown().
> 
> Here are my setup() & tearDown() methods::
> 
>     public void tearDown() throws Exception {
> 	System.out.println("\n\n ******* Inside tearDown() method of 
> RunQueryActionTest.before calling super.tearDown()");
>       super.tearDown();
>     }
> 
>     public void setUp() throws Exception {
> 	System.out.println("\n\n ******* Inside setUp() method of 
> RunQueryActionTest before calling super.setUp()");
>       super.setUp();
> 
> 	setInitParameter("config", "query/config/struts-config.xml");
> 	setInitParameter("application", "AppResources");
>     }
> 
> 
> Any clues as to what I might be missing?
> 
> Any help / pointers is appreciated.
> 
> Regards,
> 
> Sanket Desai
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: Wednesday, December 22, 2004 4:12 PM
> To: 'Cactus Users List'
> Subject: RE: Passing argument to Cactus using servlet
> 
> Hi Sankeet,
> 
> > -----Original Message-----
> > From: Sanket Desai [mailto:sdesai@firstgenetic.net]
> > Sent: mercredi 22 d├ęcembre 2004 21:31
> > To: cactus-user@jakarta.apache.org
> > Subject: Passing argument to Cactus using servlet
> >
> > Hi there,
> >
> > I'm calling onto cactus using JMeter.
> >
> > Basically calling "ServletTestRunner" servlet while passing
> > 1) suite="Fully_Qualified_TestSuiteName"
> > 2) myArg=myValue
> >
> >
> > I see that the test gets called but I need to access my passed 
> > argument
> > (myArg) in my test class that I passed from JMeter. Unfortunately 
> > that parameter is not available.I guess the "request" parameter that 
> > we have using "getRequest()" method of "CactusStrutsTestCase" or 
> > "public request variable" of ServletTestCase is actually provided by 
> > Cactus
> itself.
> >
> 
> No, that should work fine. The "request" object that you're getting is 
> the real request object. To my knowledge, we have several tests in the 
> Cactus test suite that pass HTTP parameters to the server side.
> 
> Ah, I can think of only possible reason why it wouldn't work: maybe 
> StrutsTestCase does not pass the original request? I have never used 
> strutstestcase so I don't know but try without strutstestcase as a 
> test and it should work fine. You can ask on the strutstestcase mailing list.
> Maybe they'll be able to help?
> 
> > Does anyone know a way of retrieving the passed request parameter to 
> > cactus in the test class?
> >
> > I really apreciate any help / pointers in this scenario.
> >
> > Thanking you in advance.
> >
> > Regards,
> >
> > Sanket Desai
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



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




Mime
View raw message