jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mallikarjuna S C <sc.mallikarj...@gmail.com>
Subject Re: Giving error in tests on Mavan with Weblogic 9.2
Date Fri, 10 Apr 2009 10:23:11 GMT
Hello Peter

Thanks for the concern
Here is my Class code

public class CQServletTest extends ServletTestCase {
    CQServlet servlet = new CQServlet();
    DittoResultSet drs = new DittoResultSet ();
    ServletTestCase ser = new ServletTestCase();
    public void setUp() throws Exception {
        super.setUp();
        System.out.println("CQServletTest setUp");
    }
    public void testDummySample() throws Exception {
         System.out.println("testDummySample START    ");
    }
    public void testExecuteQueryStockSolutions() throws Exception {

        String fullOrdersOn = "";
        servlet.setQueryType(CQServlet.SAMPLE_TYPE);
        drs = servlet.executeQuery1(fullOrdersOn);
        assertTrue(drs.getNumberOfRows() > 0);
    }
    public void beginExecuteQueryScreenGroup(WebRequest req) {
        try{
            req.addParameter("SampeString", "Mallikarjun");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}

Regards
Mallikarjuna

On Fri, Apr 10, 2009 at 3:39 PM, Petar Tahchiev <petar@tahchiev.net> wrote:

> Hi Mallikarjuna,
>
> Can we see the QServletTest?
>
> 2009/4/10  <sc.mallikarjuna@gmail.com>:
> > Hello
> >
> > I am writing JUnit Test Cases for Servlets. On running a sinle test case
> on maven, it is executing the begin methods, but giving errors in test
> methods.
> >
> > I have added the cactus jars, bothon client side,  made entries in
> Web.xml, added in StartWebLogic.cmd, It is not executing any test methods.
> >
> > Any help/ tip would be greatly appreciated .
> >
> > Regards
> > Mallikarjuna
> >
> > The log is as follows
> >
> > 2009-04-10 13:27:50,362 ERROR
> org.apache.cactus.server.AbstractWebTestCaller: Error instantiating class
> [QServletTest(testDummySample
> > )]
> > java.lang.NoSuchMethodException: QServletTest.<init>(java.lang.String)
> >        at java.lang.Class.getConstructor0(Class.java:2678)
> >        at java.lang.Class.getConstructor(Class.java:1629)
> >        at
> org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(AbstractWebTestCaller.java:304)
> >        at
> org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:143)
> >        at
> org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.j
> > ava(1k):125)
> >        at
> org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.jav
> > a(1k):1156)
> >        at
> org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.java(1k):101
> > )
> >        at
> org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):123)
> >        at
> org.apache.cactus.server.ServletTestRedirector.around113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1156)
> >        at
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):109)
> >        at
> org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):96)
> >        at
> org.apache.cactus.server.ServletTestRedirector.around112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1156)
> >        at
> org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):92)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >
> >
> > --
> > This message was sent on behalf of sc.mallikarjuna@gmail.com at
> openSubscriber.com
> >
> http://www.opensubscriber.com/messages/cactus-user@jakarta.apache.org/topic.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
>
>
>
> --
> Regards, Petar!
> Karlovo, Bulgaria.
> - - - - - - - -
> | Author @ Manning Publications.
> | Senior Solution Architect @ Unic
> | BGJUG-Bulgarian Java User Group Leader.
> | Apache Maven Developer.
> | Apache Jakarta PMC member.
> | Jakarta Cactus Lead Developer.
> | Codehaus Plexus Developer
> | Blogger: http://weblogs.java.net/blog/paranoiabla/
> - - - - - - - -
> Public PGP Key at:
> https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message