Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Creating Rosjava Packages 4.2 Library Project (Jar) failed,

Hi, I'm using ROS Kinetic on ubuntu 16.04. I'm following the rosjava tutorials 4.2 Library Project (Jar) (page: http://wiki.ros.org/rosjava_build_tools/Tutorials/indigo/Creating%20Rosjava%20Packages) but have stuck here for some time. I have succeeded at 4.1 Binary Projects (App).

I've taken a look at similar questions and answers but none of it completely solved my problem. I've tried:

  • installing Oracle Java 8

  • modifying package.xml and subproject's build.gradle as listed on this page (https://answers.ros.org/question/215322/rosjava-error-package-orgrosconcurrent-does-not-exist/)

  • sourcing the devel/setup.bash

Here's the output of my shell after catkin_make:

Base path: /home/user/rosjava
Source space: /home/user/rosjava/src
Build space: /home/user/rosjava/build
Devel space: /home/user/rosjava/devel
Install space: /home/user/rosjava/install
####
#### Running command: "make cmake_check_build_system" in "/home/user/rosjava/build"
####
####

#### Running command: "make -j4 -l4" in "/home/user/rosjava/build"
####
[  1%] Gradling tasks for rosjava_bootstrap
[  3%] Gradling tasks for my_rosjava_catkin_package
[  5%] Gradling tasks for rosjava_catkin_package_a
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestHeader
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_Composite
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_AddTwoInts
[  5%] Built target std_msgs_generate_messages_lisp
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeA
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeB
    [  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestString

[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestPrimitives
[  5%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestArrays
[  5%] Built target std_msgs_generate_messages_py
[  5%] Built target std_msgs_generate_messages_nodejs
[  7%] Built target rosjava_test_msgs_generate_messages_java
[  7%] Built target std_msgs_generate_messages_cpp
[  7%] Built target std_msgs_generate_messages_eus
[  9%] Compiling rosjava message artifacts for [std_msgs rosgraph_msgs std_srvs rosjava_test_msgs actionlib_msgs common_msgs diagnostic_msgs geometry_msgs nav_msgs sensor_msgs shape_msgs stereo_msgs trajectory_msgs 

visualization_msgs tf2_msgs ar_track_alvar_msgs uuid_msgs yocs_msgs concert_msgs concert_service_msgs gateway_msgs rocon_app_manager_msgs rocon_device_msgs rocon_interaction_msgs rocon_service_pair_msgs rocon_std_msgs rocon_tutorial_msgs world_canvas_msgs scheduler_msgs move_base_msgs map_store roscpp]
    [  9%] Built target gradle-rosjava_bootstrap

[  9%] Built target sensor_msgs_generate_messages_eus
[  9%] Built target tf2_msgs_generate_messages_nodejs
[  9%] Built target sensor_msgs_generate_messages_py
[  9%] Built target tf2_msgs_generate_messages_lisp
[  9%] Built target sensor_msgs_generate_messages_lisp
    [  9%] Built target tf2_msgs_generate_messages_py

[  9%] Built target tf2_msgs_generate_messages_eus
[  9%] Built target nav_msgs_generate_messages_lisp
[  9%] Built target nav_msgs_generate_messages_eus
[  9%] Built target nav_msgs_generate_messages_py

Generating message artifacts for: 
['std_msgs', 'actionlib_msgs', 'diagnostic_msgs', 'gateway_msgs', 'geometry_msgs', 'ar_track_alvar_msgs', 'move_base_msgs', 'nav_msgs', 'rosgraph_msgs', 'rosjava_test_msgs', 'sensor_msgs', 'shape_msgs', 'std_srvs', 'stereo_msgs', 'tf2_msgs', 'trajectory_msgs', 'uuid_msgs', 'rocon_service_pair_msgs', 'visualization_msgs', 

'world_canvas_msgs', 'roscpp', 'rocon_std_msgs', 'concert_service_msgs', 'rocon_app_manager_msgs', 'concert_msgs', 'rocon_device_msgs', 'rocon_interaction_msgs', 'rocon_tutorial_msgs', 'scheduler_msgs', 'yocs_msgs']

    Skipped re-generation of these message artifacts (clean first): ['std_msgs', 'actionlib_msgs', 'diagnostic_msgs', 'gateway_msgs', 'geometry_msgs', 'ar_track_alvar_msgs', 'move_base_msgs', 'nav_msgs', 'rosgraph_msgs', 

'rosjava_test_msgs', 'sensor_msgs', 'shape_msgs', 'std_srvs', 'stereo_msgs', 'tf2_msgs', 'trajectory_msgs', 'uuid_msgs', 'rocon_service_pair_msgs', 'visualization_msgs', 'world_canvas_msgs', 'roscpp', 'rocon_std_msgs', 'concert_service_msgs', 'rocon_app_manager_msgs', 'concert_msgs', 'rocon_device_msgs', 'rocon_interaction_msgs', 'rocon_tutorial_msgs', 'scheduler_msgs', 'yocs_msgs']

[  9%] Built target rosjava_messages_generate_artifacts
[  9%] Built target geometry_msgs_generate_messages_py
[  9%] Built target actionlib_msgs_generate_messages_nodejs
[  9%] Built target nav_msgs_generate_messages_nodejs
[  9%] Built target geometry_msgs_generate_messages_cpp
[  9%] Built target sensor_msgs_generate_messages_nodejs
[  9%] Built target actionlib_msgs_generate_messages_eus
[  9%] Built target actionlib_msgs_generate_messages_py
[  9%] Built target geometry_msgs_generate_messages_eus
[  9%] Built target geometry_msgs_generate_messages_lisp

[  9%] Built target nav_msgs_generate_messages_cpp
[  9%] Built target geometry_msgs_generate_messages_nodejs
[  9%] Built target actionlib_msgs_generate_messages_cpp
[  9%] Built target rosgraph_msgs_generate_messages_nodejs
[  9%] Built target tf2_msgs_generate_messages_cpp
[  9%] Built target rosgraph_msgs_generate_messages_cpp
[  9%] Built target actionlib_msgs_generate_messages_lisp
[  9%] Built target rosgraph_msgs_generate_messages_py
[  9%] Built target rosgraph_msgs_generate_messages_lisp
[  9%] Built target rosgraph_msgs_generate_messages_eus
[  9%] Built target sensor_msgs_generate_messages_cpp

[ 24%] Built target rosjava_test_msgs_generate_messages_lisp
[ 26%] Gradling tasks for zeroconf_jmdns_suite
[ 45%] Built target rosjava_test_msgs_generate_messages_py
[ 47%] Compiling Java code for rosjava_test_msgs
[ 49%] Built target rosjava_test_msgs_generate_messages_java_gradle
[ 64%] Built target rosjava_test_msgs_generate_messages_nodejs
[ 79%] Built target rosjava_test_msgs_generate_messages_cpp
[ 96%] Built target rosjava_test_msgs_generate_messages_eus
[ 96%] Built target rosjava_test_msgs_generate_messages
[ 98%] Gradling tasks for rosjava_core

warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/user/rosjava/src/rosjava_catkin_package_a/rosjava_gradle_subproject_a/src/main/java/com/github/rosjava_catkin_package_a/rosjava_gradle_subproject_a/Dude.java:1: error: ';' expected
package com.github.rosjava_catkin_package_a.rosjava_gradle_subproject_a/;
                                                                       ^
1 error
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rosjava_gradle_subproject_a: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.
rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a.dir/build.make:57: recipe for target 'rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a' failed
make[2]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a] Error 1
CMakeFiles/Makefile2:697: recipe for target 'rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a.dir/all' failed

make[1]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
warning: [options] bootstrap class path not set in conjunction with -source 1.7
[ 98%] Built target gradle-my_rosjava_catkin_package
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning

warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
    1 warning
    warning: [options] bootstrap class path not set in conjunction with -source 1.7
    1 warning
    [ 98%] Built target gradle-zeroconf_jmdns_suite
    warning: [options] bootstrap class path not set in conjunction with -source 1.7

1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: /home/user/rosjava/src/rosjava_core/rosjava_helpers/src/main/java/org/ros/helpers/ParameterLoaderNode.java uses 

unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.
1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
    warning: [options] bootstrap class path not set in conjunction with -source 1.7

1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
[ 98%] Built target gradle-rosjava_core
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Otherwise, here's my result of env|grip ROS

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/user/rosjava/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_MAVEN_DEPLOYMENT_REPOSITORY=/home/user/rosjava/devel/share/maven
ROS_MAVEN_PATH=/home/user/rosjava/devel/share/maven:/opt/ros/kinetic/share/maven
ROS_MAVEN_REPOSITORY=https://github.com/rosjava/rosjava_mvn_repo/raw/master
ROSLISP_PACKAGE_DIRECTORIES=/home/user/rosjava/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

Thanks for the help!