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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 56m ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

41 views 3 3
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