New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why I failed when compiling Mockito-1,2,3? #182

Closed
Kaka727 opened this Issue Nov 10, 2018 · 11 comments

Comments

Projects
None yet
4 participants
@Kaka727

Kaka727 commented Nov 10, 2018

I downloaded the latest Defects4J version, but when I tried to build Mockito 1,2, and 3, it failed.
The command line information is as following:

kaka@ubuntu:~/mockito/mockito_3_buggy$ defects4j compile
Running ant (compile)...................................................... FAIL
Buildfile: /home/kaka/Desktop/defects4j/framework/projects/defects4j.build.xml

compile:

gradle.compile:
[delete] Deleting: /home/kaka/mockito/mockito_3_buggy/buildSrc/src/test/groovy/org/mockito/release/notes/improvements/GitHubTicketFetcherTest.groovy
[exec] Downloading file:/home/kaka/Desktop/defects4j/framework/lib/build_systems/gradle/gradle-2.2.1-all.zip
[exec] ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[exec] Unzipping /home/kaka/mockito/mockito_3_buggy/.gradle_local_home/wrapper/dists/gradle-2.2.1-all/2q93mse3rrfvfjpjcn2srma4tl/gradle-2.2.1-all.zip to /home/kaka/mockito/mockito_3_buggy/.gradle_local_home/wrapper/dists/gradle-2.2.1-all/2q93mse3rrfvfjpjcn2srma4tl
[exec] Set executable permissions for: /home/kaka/mockito/mockito_3_buggy/.gradle_local_home/wrapper/dists/gradle-2.2.1-all/2q93mse3rrfvfjpjcn2srma4tl/gradle-2.2.1/bin/gradle
[exec] Parallel execution is an incubating feature.
[exec]
[exec] BUILD FAILED
[exec]
[exec] Total time: 35.123 secs
[exec]
[exec] FAILURE: Build failed with an exception.
[exec]
[exec] * What went wrong:
[exec] Could not resolve all dependencies for configuration ':runtime'.
[exec] > Could not resolve com.googlecode.json-simple:json-simple:1.1.1.
[exec] Required by:
[exec] :buildSrc:unspecified
[exec] > Could not GET 'https://jcenter.bintray.com/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.pom'.
[exec] > peer not authenticated
[exec]
[exec] * Try:
[exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
/home/kaka/Desktop/defects4j/framework/projects/Mockito/Mockito.build.xml:144: The following error occurred while executing this line:
/home/kaka/Desktop/defects4j/framework/projects/Mockito/Mockito.build.xml:82: exec returned: 1

Total time: 39 seconds
Executed command: cd /home/kaka/mockito/mockito_3_buggy && ant -f /home/kaka/Desktop/defects4j/framework/projects/defects4j.build.xml -Dd4j.home=/home/kaka/Desktop/defects4j -Dbasedir=/home/kaka/mockito/mockito_3_buggy compile 2>&1
Cannot compile sources! at /home/kaka/Desktop/defects4j/framework/bin/d4j/d4j-compile line 82.
Compilation failed in require at /home/kaka/Desktop/defects4j/framework/bin/defects4j line 155.

I really need help.

@jose

This comment has been minimized.

Collaborator

jose commented Nov 12, 2018

Hi @Kaka727,

Any chance you can describe your environment, i.e., OS, java version, perl version? Are you, by any chance, connected to any VPN? And, is it true you can compile all Mockito bugs but Mockito-{1,2,3}?

--
Best,
Jose

@Kaka727

This comment has been minimized.

Kaka727 commented Nov 13, 2018

Hi @jose
My virtual machine is Ubuntu 15.10 64-bit. Java version is 1.7_80 and perl version is v5.20.
I do not connect to a VPN.
From the command line information, I guess it is due to the dependency com.googlecode.json-simple:json-simple:1.1.1, right?
I meet this problem for 11 times (Mockito1-8 and 18-20 all failed because of this problem).
It's very nice of you to help me.

@jose

This comment has been minimized.

Collaborator

jose commented Nov 13, 2018

How did you install java?

@Kaka727

This comment has been minimized.

Kaka727 commented Nov 14, 2018

Just by using the .jdk files.

jose added a commit to jose/defects4j that referenced this issue Nov 17, 2018

Make Gradle dependencies available offline (fix rjust#182)
  - Updated 'get_gradle_dependencies.pl' to create a super set of all required dependencies.
  - Updated init script to download/extract all Gradle dependencies.
  - Make Mockito gradle-based bugs use the super set of dependencies.

jose added a commit to jose/defects4j that referenced this issue Nov 17, 2018

Make Gradle dependencies available offline (fix rjust#182)
  - Updated 'get_gradle_dependencies.pl' to create a super set of all required dependencies.
  - Updated init script to download/extract all Gradle dependencies.
  - Make Mockito gradle-based bugs use the super set of dependencies.
@joseAvargas

This comment has been minimized.

joseAvargas commented Nov 20, 2018

@jose I am having the same issue when trying to compile mockito_26_fixed. Is there a workaround for this?

jose added a commit to jose/defects4j that referenced this issue Nov 22, 2018

Make Gradle dependencies available offline (fix rjust#182)
  - Updated 'get_gradle_dependencies.pl' to create a super set of all required dependencies.
  - Updated init script to download/extract all Gradle dependencies.
  - Make Mockito gradle-based bugs use the super set of dependencies.
@rjust

This comment has been minimized.

Owner

rjust commented Nov 23, 2018

Just a quick update on this. The issue is that some older gradle versions are running into SSL handshake errors when downloading dependencies (jar files). We will merge PR #183 very soon, which will provide all dependencies locally and also significantly speed up the build process for Mockito bugs.

jose added a commit to jose/defects4j that referenced this issue Nov 24, 2018

Make Gradle dependencies available offline (fix rjust#182)
  - Updated 'get_gradle_dependencies.pl' to create a super set of all required dependencies.
  - Updated init script to download/extract all Gradle dependencies.
  - Make Mockito gradle-based bugs use the super set of dependencies.

@rjust rjust closed this in 6bbe356 Nov 28, 2018

@rjust

This comment has been minimized.

Owner

rjust commented Nov 28, 2018

@Kaka727 and @joseAvargas could you please verify that the merged PR indeed fixes this issue for you?

I could reproduce this problem on one of my boxes and now everything works fine again.

Thanks,
René

@Kaka727

This comment has been minimized.

Kaka727 commented Nov 28, 2018

@jose @rjust
Thanks for your attention!
This time I succeed when compiling Mockito-1 to 8. However, when I compile 18,19, and 20, it still fails.
The command line information is as follows:
kaka@ubuntu:~/mockito/mockito_20_buggy$ defects4j compile
Running ant (compile)...................................................... FAIL
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1G; support was removed in 8.0
Buildfile: /home/kaka/Desktop/defects4j/framework/projects/defects4j.build.xml

compile:

gradle.compile:
[exec] Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
[exec] 57682
[exec] Try using the -Djava.io.tmpdir= option to select an alternate temp location.
[exec]
[exec]
[exec] FAILURE: Build failed with an exception.
[exec]
[exec] * What went wrong:
[exec] Could not create service of type FileSystem using FileSystemServices.createFileSystem().
[exec]
[exec] * Try:
[exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
/home/kaka/Desktop/defects4j/framework/projects/Mockito/Mockito.build.xml:144: The following error occurred while executing this line:
/home/kaka/Desktop/defects4j/framework/projects/Mockito/Mockito.build.xml:82: exec returned: 1

Total time: 1 second
Executed command: cd /home/kaka/mockito/mockito_20_buggy && ant -f /home/kaka/Desktop/defects4j/framework/projects/defects4j.build.xml -Dd4j.home=/home/kaka/Desktop/defects4j -Dbasedir=/home/kaka/mockito/mockito_20_buggy compile 2>&1
Cannot compile sources! at /home/kaka/Desktop/defects4j/framework/bin/d4j/d4j-compile line 82.
Compilation failed in require at /home/kaka/Desktop/defects4j/framework/bin/defects4j line 155.

@jose

This comment has been minimized.

Collaborator

jose commented Nov 28, 2018

kaka@ubuntu:~/mockito/mockito_20_buggy$ defects4j compile
Running ant (compile)...................................................... FAIL
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1G; support was removed in 8.0

It seems you're using Java-8. Note that using Java > 7 might result in unexpected failing tests or even compilation issues.

[exec] Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:

Your system ran out of temporary space and the JVM failed to create any required temporary file during the compilation phase. You should first try to release some space by removing files in /tmp (or any other temporary directory your system may use) before trying to compile any D4J bug.

@joseAvargas

This comment has been minimized.

joseAvargas commented Nov 30, 2018

@rjust Thank you for the prompt response, my issue has been fixed by your solution. Thanks again

@Kaka727

This comment has been minimized.

Kaka727 commented Nov 30, 2018

@jose @rjust Thanks for your great effort!
All the aforementioned problems have been figured out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment