1

Hi i am new to cactus and when i am using tomcat5.1 and have included all the necessary jars. But when i am trying to execute it, it is showing the error,

Error : "javax.servlet.ServletException: Failed to load test suite [SampleTest], Reason is [Class not found "SampleTest"] "

Please let me know what the problem is??

Crispy
  • 5,557
  • 3
  • 30
  • 35
i2ijeya
  • 15,952
  • 18
  • 63
  • 72
  • You're going to have to give more details on how you're deploying the app, running tomcat etc etc... – Jim Downing Oct 01 '09 at 12:28
  • Did you find a solution? I'm having the same problem. I posted a workaround I was able to come up with. Not a very good one though :( – Crispy Nov 11 '09 at 22:02

2 Answers2

1

You need to include the package ie:

http://localhost:8080/myapp/ServletTestRunner?suite=common.TestEverything

Would run the suite TestEverything in the common package.

Tobias M
  • 1,308
  • 3
  • 18
  • 23
  • I looked into Cactus a bit more, finally, and found your solution to work. Better then my solution. :) so Thanks! – Crispy Oct 08 '10 at 18:30
1

If you are trying to run the Quick Start tutorial from the Cactus web site, I believe it no longer works.

Here's a mention in the release notes of 1.8.1.

    Release Notes - Cactus - Version 1.8.1

    Bug

    * [CACTUS-124] - Cannot run the Servlet Example

I get the same error message with version 1.7.x.

I just started researching this product, so I'll post an answer if I find one. Hopefully someone else will have an answer with the extra info I have provided.

EDIT:
Found a work around. Looks like it's an issue with package names. I re-compiled the two files using the default/no package and it worked.

EDIT 2:
I looked up CACTUS-124 in the bug database and it's not related. Also I believe only the class files that extend ServletTestCase need to be changed to the default/no package name.

Crispy
  • 5,557
  • 3
  • 30
  • 35