Hi ���������,

Line 92 is : JspTestCase jspInstance = (JspTestCase) theTestInstance;

So yes, somehow, the test object is not a JspTestCase object. What is
your CategoryLocalHomeTest class extending: ServletTestCase or
JspTestCase ? (I think you said ServletTestCase ...).

The only possibility I can think of, is that you have not cleaned your
server side after you made the changes and thus somehow the container is
loading the old class instead of the new one.

But there is normally no possibility to hit a wrong redirector as this
knowledge is embedded in the XXXTestCase class ...

Cheers,
-Vincent

> -----Original Message-----
> From: ��������� ������� [mailto:[EMAIL PROTECTED]]
> Sent: 16 August 2002 07:29
> To: [EMAIL PROTECTED]
> Subject: ClassCastException at ServletTestCase
> 
> Hi all! I successfuly used JspTestCase subclasses for testing EJB
local
> interfaces until the need of request parameters setting. I could not
set
> them
> properly. So I decided to try ServletTestCase, may be it will serv
better.
> When
> I changed JspTestCase to ServletTestCase in all my test cases,
recompile
> and
> redeploy all, all my tests fails with ClassCastException. Here is a
piece
> of
> output:
> Testsuite: com.fors.uniref.client.tests.AllTests
> Tests run: 6, Failures: 0, Errors: 6, Time elapsed: 29,33 sec
> 
> Testcase:
>
testCreateCategory(com.fors.uniref.client.tests.business.ejb.CategoryLoc
al
> HomeTest):Caused an ERROR
> com.fors.uniref.client.tests.business.ejb.CategoryLocalHomeTest
> java.lang.ClassCastException:
> com.fors.uniref.client.tests.business.ejb.CategoryLocalHomeTest
>       at
>
org.apache.cactus.server.JspTestCaller.setTestCaseFields(JspTestCaller.j
av
> a:92)
>       at
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
va
> :145)
> 
> I have a suspiction that there must be ServletTestCaller instead of
> JspTestCaller. Could anybody tell me if you successfuly have set
request
> parameters in JspTestCase and if you successfuly used ServletTestCase?
In
> this
> case I will try harder.
> Thank you in advance.
> Yours Alexander.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

  • ... Александр Лепехин
    • ... Vincent Massol
    • ... Alexander Lepekhine

Reply via email to