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

Build Issue: Execution failed for task ':rosjava_messages:generateSources'.

asked 2013-03-24 22:38:52 -0500

updated 2014-01-28 17:15:52 -0500

ngrennan gravatar image

While trying to perform the java installation listed here: http://docs.rosjava.googlecode.com/hg/rosjava_core/html/building.html

I ran into the following issue:

:rosjava_messages:generateSources Exception in thread "main" java.lang.NullPointerException at org.ros.internal.message.GenerateInterfaces.main(GenerateInterfaces.java:162)

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':rosjava_messages:generateSources'. > Command '/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java' finished with (non-zero) exit value 1.

Here is line 162 (GenerateInterfaces.java:162):

160     String rosPackagePath = System.getenv(EnvironmentVariables.ROS_PACKAGE_PATH);
161     Collection<File> packagePath = Lists.newArrayList();
162     for (String path : rosPackagePath.split(File.pathSeparator)) {
163       File packageDirectory = new File(path);
164       if (packageDirectory.exists()) {
165         packagePath.add(packageDirectory);
166       }
167     }
edit retag flag offensive close merge delete

Comments

Part of the problem that I'm seeing here is that 'EnvironmentVariables.ROS_PACKAGE_PATH' is null. The environment variable is just not set at this point. I don't know where it is supposed to be set, or why it is not set, but I will investigate.

Yeison Rodriguez gravatar image Yeison Rodriguez  ( 2013-03-25 00:20:04 -0500 )edit

http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH

Yeison Rodriguez gravatar image Yeison Rodriguez  ( 2013-03-25 00:35:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-25 01:23:22 -0500

This issue is currently waiting to be patched:

https://code.google.com/p/rosjava/issues/detail?id=135&sort=-id

In the meantime, you may be able to get around the problem by setting the environment variable ROS_PACKAGE_PATH as defined here: http://www.ros.org/wiki/ROS/EnvironmentVariables#ROS_PACKAGE_PATH

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-03-24 22:38:52 -0500

Seen: 549 times

Last updated: Mar 25 '13