#1725 confirmed
notalifeform (at gmail)

1.2.x/1.3.x Cobertura support broken

Reported by notalifeform (at gmail) | September 12th, 2013 @ 07:40 PM | in 1.4.x

Framework version: 1.2.x

since this commit

https://github.com/playframework/play1/commit/0ad2df4

cobertura support is apparently broken; see

https://groups.google.com/forum/#!topic/play-framework/A5ucVNeQKZE

Comments and changes to this ticket

  • ycnix

    ycnix October 31st, 2013 @ 10:40 AM

    Play 1.2.6 comes with asm-all-3.3.1.jar.
    Cobertura contains asm-tree-3.0.jar & asm-3.0.jar
    if these 2 libs are removed, cobertura works fine.

  • notalifeform (at gmail)

    notalifeform (at gmail) October 31st, 2013 @ 10:04 PM

    ah. nice spot. So a new Cobertura module release could fix it....

  • Alex

    Alex November 4th, 2013 @ 01:17 AM

    • Tag set to cobertura, tests

    Seems like the patch is already in the master version https://github.com/julienba/play-cobertura

  • Alex

    Alex November 11th, 2013 @ 02:08 AM

    According to the module documentation

    The module is loaded by declaring it in the application.conf (that is deprecated)

    But since
    https://github.com/playframework/play1/commit/d3f2984669d383d1bbe35...
    https://github.com/playframework/play1/commit/a79d1a2905e3d2ebf20c2...

    Play only load module declared in dependencies.yml.

    So the module is not working anymore with master version and the 1.3.x.

    I think that the previous fix from @ycnix, only works with the 1.2.x version

  • notalifeform (at gmail)

    notalifeform (at gmail) November 15th, 2013 @ 10:21 PM

    • Assigned user set to “notalifeform (at gmail)”

    So the issue is that you want to have conditional loading based on framework id? That is still possible:

       - play -> cobertura 2.5:
           id: test
    

    and run

      play deps --%test
    

    I tried to use https://github.com/julienba/play-cobertura (master) on 1.3.x, but had some hassles.

    First I had to change the call to play.Play.runingInTestmode (huh?) but running the server resulted in:

    ---------------------------------------
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at net.sourceforge.cobertura.util.FileLocker.lock(FileLocker.java:124)
        at play.modules.cobertura.CoberturaPlugin$CoberturaPluginShutdownThread.run(Unknown Source)
    Caused by: java.nio.channels.OverlappingFileLockException
        at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
        at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
        at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:972)
        at java.nio.channels.FileChannel.lock(FileChannel.java:1052)
        ... 6 more
    

    fixed this by adding this to my application.conf

    jvm.memory=-Dcobertura.use.java.nio=false
    

    this is on OXS 10.9 - not sure if that's related. Apparently this issue could be resolved in cobertura 1.9.3 (was suggested)

    Anyway - play auto-test showed some coverage output that looked decent to me (I have no experience with cobertura)

  • notalifeform (at gmail)

    notalifeform (at gmail) April 27th, 2014 @ 11:58 AM

    • Milestone changed from 1.3 to 1.4.x

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Referenced by

Pages