Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java error while installing picard using gradlew

See original GitHub issue

Dear all, I am trying to install picard in my Ubuntu 16.04 Virtual Machine. I cloned the repo and then I used gradlew to install the package. But it failed because of a java error:

stefania@stefania-VirtualBox:~/picard$ ./gradlew shadowJar
FAILURE: Build failed with an exception.
* Where:
Build file '/home/stefania/picard/build.gradle' line: 56
* What went wrong:
A problem occurred evaluating root project 'picard'.
> Cannot cast object 'jdk.internal.loader.ClassLoaders$AppClassLoader@c39f790' with class 'jdk.internal.loader.ClassLoaders$AppClassLoader' to class ''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Total time: 9.328 secs

* Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'picard'. at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$ at org.gradle.configuration.ProjectScriptTarget.addConfiguration( at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply( at org.gradle.configuration.project.BuildScriptProcessor.execute( at org.gradle.configuration.project.BuildScriptProcessor.execute( at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate( at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate( at org.gradle.api.internal.project.DefaultProject.evaluate( at org.gradle.api.internal.project.DefaultProject.evaluate( at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy( at org.gradle.configuration.DefaultBuildConfigurer.configure( at org.gradle.initialization.DefaultGradleLauncher$ at org.gradle.internal.Factories$1.create( at at at org.gradle.initialization.DefaultGradleLauncher.doBuildStages( at org.gradle.initialization.DefaultGradleLauncher.access$200( at org.gradle.initialization.DefaultGradleLauncher$1.create( at org.gradle.initialization.DefaultGradleLauncher$1.create( at at at org.gradle.initialization.DefaultGradleLauncher.doBuild( at at at at at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute( at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute( at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute( at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute( at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild( at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.ForwardClientInput$ at org.gradle.launcher.daemon.server.exec.ForwardClientInput$ at org.gradle.util.Swapper.swap( at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild( at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild( at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.HintGCAfterBuild.execute( at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed( at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$ at org.gradle.launcher.daemon.server.DaemonStateCoordinator$ at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute( at org.gradle.internal.concurrent.StoppableExecutorImpl$ Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'jdk.internal.loader.ClassLoaders$AppClassLoader@c39f790' with class 'jdk.internal.loader.ClassLoaders$AppClassLoader' to class '' at at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ ... 58 more

My java version is: openjdk version “9-internal” OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src) OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

I googled the error but I didn’t find anything useful. Can you please help me in solving the issue?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

smerellacommented, Mar 8, 2018

Great! It works now!! I downgraded to java 8:

sudo apt-get remove --purge openjdk*
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer

Then I re-run the command and the now I have BUILD SUCCESSFUL 😃

Many many thanks!!!

cmnbroadcommented, Nov 13, 2019

Oh, it sounds like maybe you’re trying to build picard (from the github repo ?) rather than just install it ? If so, you need to install a JDK, not just a Java runtime. Are you running a gradle command ? If you post the actual command line you’re running, and the error output from the command line, we could probably help get you back on the right path.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1967. Error while installing picard - Legacy GATK Forum
> FAILURE: Build failed with an exception. ... > > Could not GET ' ...
Read more >
picard installation failure - Biostars
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED....
Read more >
broadinstitute/picard - Docker Image
Picard is now built using gradle. A wrapper script ( gradlew ) is included which will download the appropriate version of gradle on...
Read more >
FAILURE: in Picard build - Help/Discuss - Gradle Forums
I'm brand new to gradle and having issues building Picard. ... Note: Some input files use or override a deprecated API. Note: Recompile...
Read more >
Can't execute jar- file: "no main manifest attribute"
If it doesn run on one system, then that system maybe has a too old Java version. If the JAR is for example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found