• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CactusStrutsTestCase error

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I am new to CactusStrutsTestCase. I am using RAD 7
webshpere 6.1 and i have created a java project for my
testcases in my workspace. The problem i am facing is that
when i am running my testcase as a JunitTest Case in RAD 7
i am getting this error.

java.lang.NoSuchFieldError:
servletunit/struts/CactusStrutsTestCase.config
at servletunit.struts.CactusStrutsTestCase.setUp
(CactusStrutsTestCase.java:105)
at
com.cgi.psh.fid.contractor.TestCactusLoginAction.setUp
(TestCactusLoginAction.java:24)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareSer
ver(AbstractCactusTestCase.java:155)
at
org.apache.cactus.internal.server.AbstractWebTestCaller.doTe
st(AbstractWebTestCaller.java:120)
at
org.apache.cactus.internal.server.AbstractWebTestController.
handleRequest_aroundBody0(AbstractWebTestController.java:94)
at
org.apache.cactus.internal.server.AbstractWebTestController.
handleRequest_aroundBody1$advice
(AbstractWebTestController.java:225)
at
org.apache.cactus.internal.server.AbstractWebTestController.
handleRequest(AbstractWebTestController.java:1)
at
org.apache.cactus.server.ServletTestRedirector.doPost_around
Body2(ServletTestRedirector.java:102)
at
org.apache.cactus.server.ServletTestRedirector.doPost_around
Body3$advice(ServletTestRedirector.java:225)
at
org.apache.cactus.server.ServletTestRedirector.doPost
(ServletTestRedirector.java:1)
at
org.apache.cactus.server.ServletTestRedirector.doGet_aroundB
ody0(ServletTestRedirector.java:73)
at
org.apache.cactus.server.ServletTestRedirector.doGet_aroundB
ody1$advice(ServletTestRedirector.java:225)
at
org.apache.cactus.server.ServletTestRedirector.doGet
(ServletTestRedirector.java:1)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service
(ServletWrapper.java:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service
(ServletWrapper.java:907)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter
(WebAppFilterChain.java:118)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter
(WebAppFilterChain.java:87)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter
(WebAppFilterManager.java:701)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter
(WebAppFilterManager.java:646)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest
(ServletWrapper.java:475)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleReque
st(ServletWrapper.java:463)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRe
quest(CacheServletWrapper.java:92)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest
(WebContainer.java:744)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest
(WebContainer.java:1433)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready
(WCChannelLink.java:93)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleD
iscrimination(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleN
ewInformation(HttpInboundLink.java:394)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready
(HttpInboundLink.java:274)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback
.sendToDiscriminators
(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback
.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.future
Completed(AioReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback
(AbstractAsyncFuture.java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions
(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed
(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete
(ResultHandler.java:194)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop
(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run
(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run
(ThreadPool.java:1510)


And my class :
import servletunit.struts.CactusStrutsTestCase;

public class TestCactusLoginAction extends
CactusStrutsTestCase {

public TestCactusLoginAction(String testName) {
super(testName);
}

public void testSuccessfulLogin() {

addRequestParameter("uid","abcd");
setRequestPathInfo("/login");
actionPerform();
verifyForward("success");
verifyForwardPath("/home.do?
login=true");
verifyNoActionErrors();
}

@Override
protected void setUp() throws Exception {
// TODO Auto-generated method stub
super.setUp();
}

@Override
protected void tearDown() throws Exception {
// TODO Auto-generated method stub
super.tearDown();
}

public static void main(String[] args) {
junit.textui.TestRunner.run
(TestCactusLoginAction.class);
}


}

please help me out if any body knows what is this error

Thanks in advance
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic