how do i solve this? " java.lang.NoClassDefFoundError: com_cenqua_clover/CoverageRecorder "

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

2 answers

1 accepted

3 votes

It is looking for clover jar at runtime it seems.

Do I need to configurate classpath

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!

I am new at this how do i do this ? pls can you give a walkthrough

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.

0 votes

See also this KB article.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

481 views 1 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot