hadoop java.net.URISyntaxException: Relative path in absolute URI: rsrc:hbase-common-0.98.1-hadoop2.jar

The exception is a bit misleading; there’s no real relative path being parsed, the issue here is that Hadoop “Path” doesn’t support ‘:’ in filenames. In your case, “rsrc:hbase-common-0.98.1-hadoop2.jar” is being interpreted as “rsrc” being the “scheme”, whereas I suspect you really intended to add the resource file:///path/to/your/jarfile/rsrc:hbase-common-0.98.1-hadoop2.jar”. Here’s an old JIRA discussing the illegal character:

https://issues.apache.org/jira/browse/HADOOP-3257

Note that you probably won’t be able use that absolute path either, since it still has ‘:’ in the filename. You can try escaping the filename like “rsrc%3Ahbase-common-0.98.1-hadoop2.jar”, but then it may not be found correctly on the other end where it is being used either.

The best way to fix this is to tackle the root cause of “rsrc:hbase-common-0.98.1-hadoop2.jar” being introduced–using Eclipse to build your runnable jar is one likely cause of the issue. If possible, try to build your jar using something other than Eclipse and see if the same problem occurs; you can also try to select “Package required libraries into generated jar” when creating your jar in Eclipse.

If the uber-jar ends up too large, you can also try to place the original dependency jars like hbase-common-0.98.1-hadoop2.jar into the classpath on all your nodes along with any other dependencies you may need, and then skip the call to “TableMapReduceUtil.addHBaseDependencyJars(conf);”.

Here’s an old thread of another user running into a similar problem as what you’re seeing:

http://lucene.472066.n3.nabble.com/Error-while-running-MapR-program-on-multinode-configuration-td4053610.html

Leave a Comment