ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

build rosjava failed

asked 2012-04-19 23:18:49 -0600

ira gravatar image

updated 2012-04-19 23:46:09 -0600


Recently i tried to build rosjava on a different computer with ROS Diamondback installed.

I checkout rosjava today with this command hg clone Then skipped the install step and go directly to this page (, try to build rosjava on my computer. And I got following failure message:

> Building > :rosjava_bootstrap:compileJava > Resolving dependencies ':rosjava_b:rosjava_bootstrap:compileJava
/home/nifti/Workspace/rosjava/rosjava_bootstrap/src/main/java/org/ros/internal/message/ cannot find symbol
symbol  : method parseFromString(java.lang.String)
location: class org.ros.internal.message.PrimitiveFieldType
Note: /home/nifti/Workspace/rosjava/rosjava_bootstrap/src/main/java/org/ros/internal/message/ uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rosjava_bootstrap:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Any idea what went wrong? Is it because I was building on ros dimondback?

edit retag flag offensive close merge delete


Currently, rosjava is only tested on Electric. However, that may not be the cause of your problem. Please follow the directions starting with:

It's difficult to diagnose build failures for non-standard configurations.

damonkohler gravatar image damonkohler  ( 2012-04-23 02:16:08 -0600 )edit

@damonkohler Did they forget the step in which you add export .../ to your .bashrc?

LucaGhera gravatar image LucaGhera  ( 2012-04-24 07:00:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-23 21:28:35 -0600

damonkohler gravatar image

This appears to be caused by a bug in the JDK:

I've pushed a workaround for this problem. Please update your checkout of rosjava and try again.

edit flag offensive delete link more


It still fails for me with a new error: * What went wrong: Execution failed for task ':rosjava_messages:generateSources'. > Command '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java' finished with (non-zero) exit value 1.

LucaGhera gravatar image LucaGhera  ( 2012-04-24 06:12:14 -0600 )edit

Please run gradlew with --info or --stacktrace and open a new question.

damonkohler gravatar image damonkohler  ( 2012-04-25 07:50:24 -0600 )edit

Thanks, it is successfully built now.

ira gravatar image ira  ( 2012-04-26 02:27:43 -0600 )edit

What was the resolution to this problem? I'm having the new issue listed here.

Yeison Rodriguez gravatar image Yeison Rodriguez  ( 2013-03-24 22:13:05 -0600 )edit

Question Tools


Asked: 2012-04-19 23:18:49 -0600

Seen: 770 times

Last updated: Apr 23 '12