jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qqa...@csd.abdn.ac.uk
Subject Testing EJBs
Date Tue, 26 Aug 2003 09:27:12 GMT
I am tryin to test a simple session bean. This bean has a simple method:

 public String printName(String n){ 	    
	String name=n;
	System.out.println("name is "+ name);
	return name;
	}

I followed the EJB example provided in the cactus/samples to write a test class 
for this bean and included the following method to test my printName(..) method:

public void testPrintName() throws Exception
    {
    	try
    	{
    	String s = cFacade.printName("john");
        assertNotNull(s);
    	}
    	catch(Exception e)
    	{
    		e.printStackTrace();
    	}
    }

But when I run my test class using the browser, I get the following errors:

Name: testPrintName 
Status: Error 
"
org.apache.commons.httpclient.HttpMethod.setRequestHeader
(Ljava/lang/String;Ljava/lang/String;)V 

java.lang.NoSuchMethodError: 
org.apache.commons.httpclient.HttpMethod.setRequestHeader
(Ljava/lang/String;Ljava/lang/String;)V
at 
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.dispatch50_co
nnect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj
[1k]:152)
at  ....".

Can anyone guide me how to solve this problem or any other information on 
testing ejb.


Mime
View raw message