Wednesday, October 17, 2012

Solved - 4shared desktop crashes on Linux (desktop4shared)

4shared currently offers a massive 15GB of storage for free on their servers, and they offer a Java client program for Ubuntu/Debian Linux named 'desktop4shared'.

When trying to run this program with Ubuntu 12.04 (or perhaps Ubuntu 12.10), the following error can occur:
$ desktop4shared 
Guessing JAVA_HOME...
Assuming JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
Starting desktop4shared...
19:59:43 [AWT-EventQueue-0] INFO  Initialize - UI Initialized in 215
19:59:49 [main] ERROR common.GlobalExceptionHandler - Uncaught exception in thread [main] : the number of constructors during runtime and compile time for groovy.util.FactoryBuilderSupport do not match. Expected 3 but got 2
java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for groovy.util.FactoryBuilderSupport do not match. Expected 3 but got 2
        at<init>(ApplicationBuilder.groovy:26) ~[griffon-rt-0.9.jar:0.9]
        at<init>(ApplicationBuilder.groovy) ~[griffon-rt-0.9.jar:0.9]
        at griffon.builder.UberBuilder.uberInit(UberBuilder.groovy:73) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.CompositeBuilderHelper.handleLocalBuilder(CompositeBuilderHelper.groovy:86) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.CompositeBuilderHelper$handleLocalBuilder.callStatic(Unknown Source) ~[na:na]
        at org.codehaus.griffon.runtime.util.CompositeBuilderHelper$_createBuilder_closure1.doCall(CompositeBuilderHelper.groovy:51) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.CompositeBuilderHelper.createBuilder(CompositeBuilderHelper.groovy:50) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.CompositeBuilderHelper$ Source) ~[na:na]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.buildMVCGroup(GriffonApplicationHelper.groovy:233) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper$buildMVCGroup.callStatic(Unknown Source) ~[na:na]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.createMVCGroup(GriffonApplicationHelper.groovy:191) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper$createMVCGroup$0.callStatic(Unknown Source) ~[na:na]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper.createMVCGroup(GriffonApplicationHelper.groovy:171) ~[griffon-rt-0.9.jar:0.9]
        at org.codehaus.griffon.runtime.util.GriffonApplicationHelper$ Source) ~[na:na]
        at griffon.core.BaseGriffonApplication$_startup_closure2.doCall(BaseGriffonApplication.groovy:178) ~[griffon-rt-0.9.jar:0.9]
        at griffon.core.BaseGriffonApplication.startup(BaseGriffonApplication.groovy:177) ~[griffon-rt-0.9.jar:0.9]
        at griffon.core.GriffonApplication$ Source) ~[na:na]
        at griffon.swing.SwingApplication.startup(SwingApplication.groovy) ~[griffon-rt-0.9.jar:0.9]
        at griffon.core.GriffonApplication$startup.callCurrent(Unknown Source) ~[na:na]
        at griffon.swing.SwingApplication.realize(SwingApplication.groovy:61) ~[griffon-rt-0.9.jar:0.9]
        at griffon.application.StandaloneGriffonApplication$ Source) ~[na:na]
        at griffon.swing.SwingApplication.main(SwingApplication.groovy:107) ~[griffon-rt-0.9.jar:0.9]

Credit for figuring this problem out goes to a user by the handle Zorael over at

The problem is that desktop4shared is using an outdated library reference in the library named "groovy". To fix this, an older version of groovy needs to be installed on the system.

Download the older library version here:

You should be able to click to install the library, but if that doesn't work, you may use this command in a terminal (correct the path location for your system):
sudo dpkg -i /path/to/groovy_1.7.10-2_all.deb

To prevent the library from accidentally upgrading, copy/paste these two commands into the terminal:
printf 'Package: groovy\nPin: version 1.7*\nPin-Priority: 1001\n' | sudo tee /etc/apt/preferences.d/groovy
echo groovy hold | sudo dpkg --set-selections

Comment or leave feedback sepero 111 @ gmx . com


  1. Thanks a lot..... your post helped me.

  2. Thank you! Now I have been able to install it in two computers. But now there is an additional problem. When I try to upload something, even a small text file,I get this message: "File(s) you try to upload are greater than file size limit"

  3. It works!
    Thanks a lot!
    But, I didn't understand the part to prevent accidentally upgrading...

    1. To prevent upgrading we use a process called "apt pinning". The link below will give you an overview. You'll want to search the internet for more information.

  4. can someone try installing 'libgroovy1.7.2-java' and see if this make any difference? as opposed to installing the older version of groovy? Thanks.


    1. Hi xxx,
      Unfortunately, it won't help because the problem is with 4shared software. It might help if someone politely asks 4shared to update their software.

  5. Hello
    I'm using Xubuntu 14.04 LTS and had this problem.

    This tutorial is perfect, but the library not be where was informed.

    In this link everybody can access the library.


    1. @Nilson Thanks for the tip. I updated the instructions with the link you provided. :)

  6. Hi! Thanks for your help! Only for educational pruposses, how i can revert the changes? I use this method for other package. Thanks again ;)

  7. This comment has been removed by the author.

  8. You saved me! Internet in Brazil and shit, now I can download finally 2GB file and send smoothly.

  9. only lacked this to avoid updating the groovy:
    echo "groovy hold" | grep dpkg --set-selections