Ask Your Question

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:

I ran into the following issue:

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

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 (

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


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

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

1 Answer

Sort by ยป oldest newest most voted

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

This issue is currently waiting to be patched:

In the meantime, you may be able to get around the problem by setting the environment variable ROS_PACKAGE_PATH as defined here:

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


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

Seen: 316 times

Last updated: Mar 25 '13