jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amrendra Kumar <kamre...@in.ibm.com>
Subject RE: unit.framework.AssertionFailedError.Exception in constructor :Class org.apache.commons.logging.impl.SimpleLog doesnot implement Log
Date Tue, 13 Jan 2004 16:45:57 GMT




Hi Vincent,
           Thanks for the reply.
                        It seems the error is coming from client side
only...I  got the same error if I followed the following the following EJB
example mentioned on the URL.
http://www-106.ibm.com/developerworks/websphere/techjournal/0206_wosnick/wosnick.html



I used the latest jakarta-cactus-13-1.6dev20040107.zip and in this example
says to use cactus 1.3 binaries. as it is older document.

I couldn't attach stack trace gif  but putting I am writing it  for your
reference.




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
at o
rg.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
at
org.apache.cactus.internal.client.ClientTestCaseDelegate.setDelegatedTest_aroundBody3$advice(ClientTestCaseDelegate.java:143)
at
org.apache.cactus.internal.client.ClientTestCaseDelegate.setDelegatedTest(ClientTestCaseDelegate.java)
at
org.apache.cactus.internal.client.ClientTestCaseDelegate.<init>(ClientTestCaseDelegate.java:157)
at
org.apache.cactus.internal.client.WebClientTestCaseDelegate.<init>(WebClientTestCaseDelegate.java:
95)
at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188)
at org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164)
at
com.ibm.swosnick.test.EJBServletTestCase.<init>(EJBServletTestCase.java:36)
at java.lang.reflect.Constructor.newInstance(Native method)
at
com.ibm.swosnick.test.EJBServletTestCase.suit(EJBServletTestCase.java:36)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:111)
at
com.ibm.swosnick.test.EJBServletTestCase.main(EJBServletTestCase.java:41)
}





Thanks,
Amrendra



                                                                                         
                                             
                      "Vincent Massol"                                                   
                                             
                      <vmassol@pivolis.        To:       "'Cactus Users List'" <cactus-user@jakarta.apache.org>
                       
                      com>                     cc:                                    
                                                
                                               Subject:  RE: unit.framework.AssertionFailedError.Exception
in constructor :Class       
                      12/01/2004 18:29          org.apache.commons.logging.impl.SimpleLog
doesnot implement Log                        
                      Please respond to                                                  
                                             
                      "Cactus Users                                                      
                                             
                      List"                                                              
                                             
                                                                                         
                                             
                                                                                         
                                             



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



---------------------------------------------------------------------
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