jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sivalingam Sivasuthan" <sivasut...@jkcs.slt.lk>
Subject RE: Problem I Calling the Servlet
Date Mon, 31 Dec 2001 10:29:13 GMT

Hi,

Now  My EJB Testing is working. I am getting the following results....

tests:
    [junit] Running org.apache.cactus.TestAll
    [junit] Inside TestAll.java.................
     [java] All Finished
    [junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 2.328 sec
    [junit] Testsuite: org.apache.cactus.TestAll
    [junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 2.328 sec
    [junit]
    [junit] Testcase: testConvert took 2.234 sec
    [junit] Testcase: testConvert1 took 0.063 sec
    [junit] Testcase: testConvert2 took 0.031 sec
    [junit]     FAILED
    [junit] dollar expected:<100.0> but was:<1.0>
    [junit] junit.framework.AssertionFailedError: dollar expected:<100.0>
but was:<1.0>
    [junit]     at junit.framework.Assert.fail(Assert.java:51)
    [junit]     at junit.framework.Assert.failNotEquals(Assert.java:234)
        ...............................................
Is there any other ways that I can see this results in GUI mode?
Even if I put the following to the TestAll class's main method it is not
working
junit.swingui.TestRunner.main(new String[] {TestAll.class.getName()});

Thanks for all the supports u all gave to me
Siva.



Vincent,
Thanks for your response.
I didn't change any of the Sample application except build.properties and
Cactus.properties without changing the Cactus.properties (
http://localhost:7001/test/ServletRedirector)
My Weblogic Server is running on the port 7001 and the client is using the
default 8080 port.
But Still I am getting the same Error.
 I didn't understand how the sample applications TestAll  class will call
the ConverterTest without adding
suite.addTest(org.apache.cactus.sample.ejb.ConverterTest.suite()) to it?
Please help me to findout where I am making the mistake.

-Siva





                    "Vincent

                    Massol"              To:     "'Sivalingam Sivasuthan'"

                    <vmassol@octo.        <sivasuthan@jkcs.slt.lk>

                    com>                 cc:

                                         Subject:     RE: Problem I Calling
the Servlet
                    12/28/2001

                    06:12 PM







It probably means what it says ... :-)

It also means that you have modified the base sample application. I
would suggest you use it as is (i.e. with no modifications whatsoever,
except to build.properties). It will work as is with no problem. Then
you can learn from it and understand how it works. Then only, you can
start to adapt it to your project and needs ...

There are too many things that you could have configured wrong to help
you at this point, which is why I am recommending to run the sample
application as is.

Thanks
-Vincent

> -----Original Message-----
> From: Sivalingam Sivasuthan [mailto:sivasuthan@jkcs.slt.lk]
> Sent: 28 December 2001 05:36
> To: vmassol@octo.com; cactus-user@jakarta.apache.org
> Subject: RE: Problem I Calling the Servlet
>
>
>    Hi ,
>    Thanks for your reply.Now I have Understood that I have to call the
>    redirector from the Cactus client side.
>    I have downloaded night build(25122001)and did all necessary
changes to
>    the propertyfile(cactus.properties - made
cactus.servletRedirectorURL
> to
>    http://localhost:7001/test/ServletRedirector)
>    and also configured all the properties of the build.properties file
>
>    when I run the ant I am gettin the build failed like this
> tests:
>     [junit] Running org.apache.cactus.TestAll
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 12.937
sec
>     [junit] Testsuite: org.apache.cactus.TestAll
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 12.937
sec
>     [junit]
>     [junit] Testcase: testLongProcess took 12.937 sec
>     [junit]     Caused an ERROR
>     [junit] Error finding class
> [org.apache.cactus.sample.unit.TestServletTestCase_TestResult] in
> classpath. If you are getting this message Cactus may not be able to
see
> your test cases.
>     [junit]  Possible causes include:
>     [junit]     - Your webapp may not include your test classes,
>     [junit]     - The cactus.jar resides in a global location and your
> test
> classes reside in a specific webapp,
>     [junit]     - Something else ... !
>     [junit] javax.servlet.ServletException: Error finding class
> [org.apache.cactus.sample.unit.TestServletTestCase_TestResult] in
> classpath. If you are getting this message Cactus may not be able to
see
> your test cases.
>     [junit]  Possible causes include:
>     [junit]     - Your webapp may not include your test classes,
>     [junit]     - The cactus.jar resides in a global location and your
> test
> classes reside in a specific webapp,
>     [junit]     - Something else ... !
>     [junit]     at
>
org.apache.cactus.server.AbstractTestCaller.getTestClassClass(AbstractTe
st
> Call
> er.java:339)
> ..............
>
> is there anythink else to be done othere than changing the
> cactus.properties file
> to test my EJB.
>
> -Siva
>
> > -----Original Message-----
> > From: Vincent Massol  [mailto:vmassol@octo.com]
> > Sent: Wed, 19 Dec 2001 11:53:25 -0800
> > To: cactus-user@jakarta.apache.org
> > Subject: RE: Problem I Calling the Servlet
>
> >Hi Siva,
>
> >Who told you this is not the normal behaviour ? ;-)
>
> >In short, you are not allowed to call directly the cactus
redirectors.
> >In other words the redirector API is not a public one. They must be
> >called by the Cactus client side which knows the protocol to call
them.
> >A Cactus test is started by using a JUnit test runner.
>
> >-Vincent
>
> > -----Original Message-----
> > From: Sivalingam Sivasuthan [mailto:sivasuthan@jkcs.slt.lk]
> > Sent: 19 December 2001 10:28
> > To: cactus-user@jakarta.apache.org
> > Subject: Problem I Calling the Servlet
> >
> > I am using Weblogic6.1 with sp1 deployment is ok.
> > But when i Call the Servlet in the browser url :
> > http://127.0.0.1:7001/EJBUnitTest/ServletRedirector
> > I am getting the following error :
> > I can't be able to figureout this error
> > <Error> <HTTP>
> > <[WebAppServletContext(3876153,EJBUnitTestWAR,/EJBUnitTestWAR)]
> > Servlet failed with ServletException
> > javax.servlet.ServletException: Missing service name parameter
> > [Cactus_Service] in HTTP request.
> >         at
>
>org.apache.cactus.server.AbstractTestController.getServiceName(Abstract
Te
> stController.
>
> > java;org/apache/cactus/util/log/LogAspect.java(1k):179)
> >         at
>
>org.apache.cactus.server.AbstractTestController.handleRequest$ajcPostAr
ou
> nd7(AbstractT
>
> >
estController.java;org/apache/cactus/util/log/LogAspect.java(1k):112)
> >         at
>
>org.apache.cactus.server.AbstractTestController.handleRequest$ajcPostAr
ou
> nd7$ajcVoidWr
>
>
apper(AbstractTestController.java;org/apache/cactus/util/log/LogAspect.j
> ava(1k))
> >         at
>
>org.apache.cactus.server.AbstractTestController.handleRequest(AbstractT
es
> tController.j
>
> > ava;org/apache/cactus/util/log/LogAspect.java(1k):1135)
> >         at
>
>org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10(S
er
> vletTestRedir
>
> > ector.java;org/apache/cactus/util/log/LogAspect.java(1k):131)
> >         at
>
>org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10$a
jc
> VoidWrapper(S
>
> >
>
ervletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k))
> >         at
>
>org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedire
ct
> or.java;org/a
>
> > pache/cactus/util/log/LogAspect.java(1k):1135)
> >         at
> >
>
org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6(Serv
> le
> > tTestRedirec
> > tor.java;org/apache/cactus/util/log/LogAspect.java(1k):105)
> >         at
> >
>
org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6$ajcV
> oi
> > dWrapper(Ser
> >
vletTestRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k))
> >         at
> >
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirect
> or
> > .java;org/ap
> > ache/cactus/util/log/LogAspect.java(1k):1135)
> >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> ja
> > va:265)
> >         at
> >
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
> ja
> > va:200)
> >         at
> >
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
> et
> > Context.java
> > :2456)
> >         at
> >
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
> ja
> > va:2039)
> >         at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> >         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> >
> >
> > Thanks In Advance.
> >
> > Regrads,
> > Siva
>
>








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






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


Mime
View raw message