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

rosjava missing library

asked 2011-10-11 12:03:25 -0500

Imré gravatar image

updated 2011-10-17 03:36:57 -0500

Good evening,

I receive the following exception when trying to build rosjava:

/home/imre/ROS_DIR/rosjava_core/rosjava/src/main/java/org/ros/internal/node/ package org.ros.message.rosgraph_msgs does not exist

Where can I download the package org.ros.message.rosgraph_msgs for rosjava?

I thank you in advance.

Here is my setup:


Ubuntu; Version 11.04 (natty); Kernel Linux 2.6.38-11-generic-pae; GNOME 2.32.1

Version of ROS:

At first, I had installed ROS Diamondback. And I had the error I am talking about in this question. Then I installed ROS Electric Emys in its place once it was released, but it was not due to my question. I still have the error with this version of ros.

Version of java:

java version "1.6.0_22"; OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1); OpenJDK Server VM (build 20.0-b11, mixed mode)

Version of Ant:

Apache Ant version 1.8.1 compiled on October 13 2010

Exact commands used to download rosjava:

At first I tried: imre@TK-421:~$ svn co

svn: Le serveur a envoyé une valeur inattendue (405 Method Not Allowed) en réponse à la requête OPTIONS pour ''

which means "The server has sent an unexpected value (405 Method Not Allowed) in answer to the request OPTIONS for ''"

So instead I used: imre@TK-421:~$ wget -r -l 1000 --no-check-certificate


edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted

answered 2011-10-17 05:47:01 -0500

kwc gravatar image

There are multiple problems:

  1. You have to use ROS Electric, not Diamondback (should be resolved now)
  2. is a Mercurial repository, not subversion, so you can't use svn or wget with it. The correct command is:

    hg clone rosjava_core

edit flag offensive delete link more


I am indeed using ROS Electric now. I have also used the hg command. Now I can launch "rosmake rosjava_core". However, it fails with the same error I sent this question for. It still misses the library I indicated in my question.
Imré gravatar image Imré  ( 2011-10-17 08:46:21 -0500 )edit
The last piece of advice I can offer is try to delete ~/.ros/rosjava and then "rosmake --threads=1 rosjava". If that doesn't work, I can only think that the system setup is not configured correctly.
kwc gravatar image kwc  ( 2011-10-17 11:50:29 -0500 )edit
This advice actually worked, thank you very much for your time and effort. I will post the complete answer.
Imré gravatar image Imré  ( 2011-10-20 04:21:57 -0500 )edit

answered 2011-10-11 21:47:09 -0500

Alexandr Buyval gravatar image

Check whether you have a package ros_comm ( There is rosgraph_msgs in ros_comm.

edit flag offensive delete link more


Thank you for your answer. I have the package ros_comm and rosgraph_msgs is inside but there are only py files in there. I am looking for the java library, which contains the class.
Imré gravatar image Imré  ( 2011-10-12 01:54:59 -0500 )edit
org.ros.message.rosgraph_msgs must appear after command "rosmake" for package "rosjava_core". I have got "org.ros.rosjava.rosgraph_msgs-0.0.0.jar" in folder /home/alex/.ros/rosjava/lib
Alexandr Buyval gravatar image Alexandr Buyval  ( 2011-10-12 06:54:45 -0500 )edit
I thank you for your answer. So, if I understand well, the necessary jar will be created after I apply "rosmake rosjava_core". However, I don't have a "rosjava_core" package. I downloaded rosjava at the address that was provided to me:
Imré gravatar image Imré  ( 2011-10-12 12:02:31 -0500 )edit
'rosjava_core' is the name of the stack. When you checkout from source, you should name the checkout 'rosjava_core'. If there are issues, try "rm -rf ~/.ros/rosjava" to make sure there isn't any bad state lingering about. Also, 'rosmake rosjava' works as well.
kwc gravatar image kwc  ( 2011-10-12 16:25:58 -0500 )edit
Thank you for your answer. The error I got in the first place happens when I call "rosmake rosjava", that was why I posted my question. So, as I named my stack "rosjava" and not "rosjava_core", should I change the name I put or doesn't it matter?
Imré gravatar image Imré  ( 2011-10-13 04:05:40 -0500 )edit
Yes, it matters
kwc gravatar image kwc  ( 2011-10-13 05:17:10 -0500 )edit
I changed the name to "rosjava_core" and applied "rm -rf ~/.ros/rosjava". I still get the same error when runnin "rosmake rosjava". When I run "rosmake rosjava_core" the terminal freezes at "[ rosmake ] Logging to directory/home/imre/.ros/rosmake/rosmake_output-20111013-150638 ".
Imré gravatar image Imré  ( 2011-10-13 07:11:46 -0500 )edit
I also updated ROS_PACKAGE_PATH after changing the name to "rosjava_core".
Imré gravatar image Imré  ( 2011-10-13 07:15:34 -0500 )edit

answered 2011-10-20 04:23:10 -0500

Imré gravatar image

I removed the ~/.ros/rosjava folder and then applied "rosmake --threads=1 rosjava". This solved the problem.

edit flag offensive delete link more

answered 2013-08-15 16:38:26 -0500

Make sure you are in a properly installed ROS Workspace.

Then, to get ROS Java:

rosws set --git --version=groovy-devel rosjava_core 'git://'

remember to run 'rosws update rosjava_core' to update the folder from git

Explicitly specify rosjava_core - I kept forgetting this, and it was the source of the problem you're having above.

edit flag offensive delete link more

Question Tools


Asked: 2011-10-11 12:03:25 -0500

Seen: 794 times

Last updated: Aug 15 '13