Ask Your Question
0

Rosjava error: package org.ros.concurrent does not exist

asked 2015-08-05 21:46:02 -0500

Oliver gravatar image

Hi,

When I follow the Creating Rosjava Packages (Catkin Style) tutorial, the system gives the following error: error: package org.ros.concurrent does not exist

More specifically, the error occurs in the Library Project (Jar) step:

> cd src/rosjava_catkin_package_a
> catkin_create_rosjava_library_project rosjava_gradle_subproject_a
> cd ../..
> catkin_make

The console output is:

oliver@oliver-VirtualBox:~/myjava/src/rosjava_catkin_package_a$ catkin_create_rosjava_library_project rosjava_gradle_subproject_a

Creating rosjava project 
  Name      : rosjava_gradle_subproject_a
  File      : build.gradle
  File      : settings.gradle
  File      : Dude.class
  File      : CMakeLists.txt (gradle task update)
oliver@oliver-VirtualBox:~/myjava/src/rosjava_catkin_package_a$ cd ..
oliver@oliver-VirtualBox:~/myjava/src$ cd ..
oliver@oliver-VirtualBox:~/myjava$ catkin_make
Base path: /home/oliver/myjava
Source space: /home/oliver/myjava/src
Build space: /home/oliver/myjava/build
Devel space: /home/oliver/myjava/devel
Install space: /home/oliver/myjava/install
####
#### Running command: "make cmake_check_build_system" in "/home/oliver/myjava/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/oliver/myjava/devel
-- Using CMAKE_PREFIX_PATH: /home/oliver/rosjava/devel;/opt/ros/indigo
-- This workspace overlays: /home/oliver/rosjava/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/oliver/myjava/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.14
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - rosjava_catkin_package_a
-- ~~  - rosjava_catkin_package_b
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'rosjava_catkin_package_a'
-- ==> add_subdirectory(rosjava_catkin_package_a)
-- +++ processing catkin package: 'rosjava_catkin_package_b'
-- ==> add_subdirectory(rosjava_catkin_package_b)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oliver/myjava/build
####
#### Running command: "make -j2 -l2" in "/home/oliver/myjava/build"
####
[100%] Gradling tasks for rosjava_catkin_package_a
/home/oliver/myjava/src/rosjava_catkin_package_a/rosjava_gradle_subproject_a/src/main/java/com/github/rosjava_catkin_package_a/rosjava_gradle_subproject_a/Talker.java:19: error: package org.ros.concurrent does not exist
import org.ros.concurrent.CancellableLoop;
                         ^
34 similar errors omitted

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.
make[2]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a] Error 1
make[1]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j2 -l2" failed

The previous step, Binary Projects (App), was successful.

Oliver

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2017-06-08 10:37:07 -0500

cyber gravatar image

In you package.xml file, add

<build_depend>message_generation</build_depend>

<build_depend>std_msgs</build_depend>

<run_depend>message_runtime</run_depend>

<run_depend>std_msgs</run_depend>

and in your subproject's build.gradle, add or uncomment

compile 'org.ros.rosjava_core:rosjava:[0.2,)'

edit flag offensive delete link more
0

answered 2018-01-31 11:55:16 -0500

jubeira gravatar image

You are missing rosjava dependencies.

That has to be added in the bottom-level build.gradle as @cyber indicates. In the case of library projects, that dependency comes commented by default.

@eduardo_lasca that's another error, you can open another question for it. The problem is that you are using an old version of the Java JDK; upgrade to Java 8 and it should work.

edit flag offensive delete link more
0

answered 2017-06-05 12:39:31 -0500

eduardo_lasca gravatar image

Are you following this tutorial: http://wiki.ros.org/rosjava_build_too... If you are, do you have some progress? I'm trying this tutorial and have a similar error. This one:

 Base path: /home/robo/ws_rosjava
Source space: /home/robo/ws_rosjava/src
Build space: /home/robo/ws_rosjava/build
Devel space: /home/robo/ws_rosjava/devel
Install space: /home/robo/ws_rosjava/install
####
#### Running command: "make cmake_check_build_system" in "/home/robo/ws_rosjava/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/robo/ws_rosjava/devel
-- Using CMAKE_PREFIX_PATH: /home/robo/ws_rosjava/devel;/home/robo/rosjava/devel;/opt/ros/indigo
-- This workspace overlays: /home/robo/ws_rosjava/devel;/home/robo/rosjava/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/robo/ws_rosjava/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.19
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - rosjava_catkin_package_a
-- ~~  - rosjava_catkin_package_b
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'rosjava_catkin_package_a'
-- ==> add_subdirectory(rosjava_catkin_package_a)
-- +++ processing catkin package: 'rosjava_catkin_package_b'
-- ==> add_subdirectory(rosjava_catkin_package_b)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/robo/ws_rosjava/build
####
#### Running command: "make -j2 -l2" in "/home/robo/ws_rosjava/build"
####
Scanning dependencies of target gradle-rosjava_catkin_package_a
[100%] Gradling tasks for rosjava_catkin_package_a
Downloading https://services.gradle.org/distributions/gradle-2.2.1-bin.zip

Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1376)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1348)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:56)
    at org.gradle.wrapper.Download.download(Download.java:42)
    at org.gradle.wrapper.Install$1.call(Install.java:57)
    at org.gradle.wrapper.Install$1.call(Install.java:44)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:44)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
    at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
    at sun.security.pkcs11.P11Key.equals(P11Key.java:158)
    at java.util.ArrayList.indexOf(ArrayList.java:298)
    at java.util.ArrayList.contains(ArrayList.java:281)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:239)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    at sun.security ...
(more)
edit flag offensive delete link more

Comments

Please don't use an answer to ask a question. This sin't a forum. Please open a new question or make a comment on the original.

jayess gravatar imagejayess ( 2018-01-31 14:20:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-08-05 21:46:02 -0500

Seen: 848 times

Last updated: Jan 31 '18