jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: unit.framework.AssertionFailedError.Exception in constructor :Class org.apache.commons.logging.impl.SimpleLog doesnot implement Log
Date Mon, 12 Jan 2004 18:29:09 GMT
Hi Amrendra,

You need the commons-logging jar. This is required by Cactus. Your
problem seems to be a classpath error. I haven't used WSAD nor the
Websphere test environment.

Can you show the full stack trace so we know if the error is coming from
the client side or the server side? I suspect the client side. The error
probably means that the classloader used to load your test case class
cannot load the SimpleLog class (part of commons-logging jar).

-Vincent

> -----Original Message-----
> From: Amrendra Kumar [mailto:kamrendr@in.ibm.com]
> Sent: 08 January 2004 16:13
> To: Cactus Users List
> Subject: Re: unit.framework.AssertionFailedError.Exception in
constructor
> :Class org.apache.commons.logging.impl.SimpleLog doesnot implement Log
> 
> 
> 
> 
> 
> Hi,
>        I used jakarta-cactus-13-1.6dev20040107.zip and tried to run
the
> cactus testcase in WSAD 5.1 and got following error .
> 
> junit.framework.AssertionFailedError.Exception in constructor
>
:testHelloWorld1(org.apache.commons.logging.logConfigurationException:or
g.
> apache.commons.logging.LogConfigurationException:
> 
>  org.apache.commons.logging.LogConfigurationException: Class
> org.apache.commons.logging.impl.SimpleLog doesnot implement Log
> 
> 
> I am new to cactus.  Tried to run for HelloWorld and got the above
> mentioned error ..I have put all the jars file in java build path in
WSAD
> 5.1. When I removed commons-logging-1.0.3.jar and added log4j.jar then
> error message came class not Found Exception.  can any body help me to
> getting rid of theis error "SimpleLog doesnot implement Log".
> 
> Here is the code
> 
> import junit.framework.*;
> import org.apache.cactus.*;
> 
> 
> public class HelloWorld1TestCase extends ServletTestCase {
> 
>       HelloWorld1 helloWorld = new HelloWorld1();
> 
>        // Defines the testcase name for JUnit.
>       public HelloWorld1TestCase(String theName) {
>             super(theName);
>       }
> 
>       // Starts the tests using the JUnit TestRunner
>       public static void main(String[] args) {
>             junit.swingui.TestRunner.main(
>                   new String[] {
HelloWorld1TestCase.class.getName()});
>       }
>       // Returns a TestSuite that includes all methods starting with
> "test"
>       public static Test suite() {
>             return new TestSuite(HelloWorld1TestCase.class);
>       }
> 
>       // Set up the intial context and JNDI namespace and get a Home
> interface
>       public void setUp() {
> 
>       }
> 
>       // JUnit will execute the tests from the bottom up so arranged
that
> way.
> 
>       // Tests the third "business" method.
>       // See the Cactus documentation and javadocs for other
>       // forms of the assertXXX() methods that are useful
> 
>       // Tests the first "business" method
>       public void testHelloWorld1() throws Exception {
>             String message = helloWorld.sayHelloWorld();
>             System.out.println("Message returned: " + message);
>             assertNotNull(message);
>             assertEquals(message, "Amar Hello World!");
>       }
> }
> 
> Thanks in advance,
> Amar
> 
> 
> ---------------------------------------------------------------------
> 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