This sounds like more of an issue with cobertura than maven.

I would suggest you try asking the cobertura guys/gals.

As a pointer, I'm betting some of your classes do no have their explicit
serialVersionUID defined.  If those classes are used in the EJB remote
calls, then the instrumented versions of the classes will have a different
implicit serialVersionUID's from the non-instrumented ones loaded by the EJB
classloader to handle the remote end receiving the calls... and vice versa,
any results from the EJB remote invocations will have the same issue.

One workaround is to generate serialVersionUID constants for all your
classes that are marked Serializable (which is good practice anyway), that
might get you a step farther, but I suspect that you'll have to follow up
with the Cobertura guys/gals anyway.

-Stephen

P.S.
  If you find the actual solution after talking to the cobertura guys/gals
can you please post the results to this thread so that others may benifit
from your learnings

On 10 April 2010 04:50, aabhijit <[email protected]> wrote:

>
>
> Actually I am using cobertura maven plug-in version 2.3 with maven version
> 2.1.
> In my JUnits I have DB and EJB calls. During the build I use surefire maven
> plugin property “forkMode=always” and with this property the unit test
> cases
> pass properly.  Otherwise Surefire plugin has problem running JUnits and
> they fail.
>
> Now during the cobertura:cobertura stage the many test cases fail. The DB
> test cases fail at the executing the DB call (remote calls) and while
> running EJB calls I get serialVersionUID mismatch exceptions. I tried
> instrumenting only the classes under the current module as I believe
> instrumentation of the other classes might be giving this SerialVersionUID
> mismatch but no luck.
>
> This is multimodule maven build with around 70 artifacts being build in
> that
> build. Even with the single module build the cobertura test cases fail.
>
> Since the test cases fail we are not able to see the code coverage.
>
> I would be extremely thankful if you guys can help me to locate the
> problem.
>
> --
> View this message in context:
> http://old.nabble.com/Cobertura-version-2.3-fails-the-JUnit-test-cases-tp28199798p28199798.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to