I am testing code instrumentation on web app(contains servlet).I am using maven(with clover plugin) for build this.I compiled and deployed without errors.But when try to open HelloWorld servlet on server.I had this error:
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [HelloWorld] in context with path [/my-webapp-clover] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder
at com.yapikredi.app.HelloWorld.doGet(HelloWorld.java:14)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
thanks in advance
It is looking for clover jar at runtime it seems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ideally, it shouldn't be needed at runtime but try adding it in classpath and see if it works. I don't know why clover is required during runtime!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am new at this how do i do this ? pls can you give a walkthrough
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to you i solved it.
I add .classpath file to web app in server.This classpath point to clover.jar(WEB-INF\lib\clover.jar).
Then re-run server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See also this KB article.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.