In case somebody else is  also struggling with the classpath nightmare.
Here is the fix: I created a *resources* folder under src/jvm(the source
folder), and copy my hbase-conf.xml to *resources* folder, and add the
resource node in pom.xml

<build>

 <sourceDirectory>src/jvm</sourceDirectory>

 <testSourceDirectory>test/jvm</testSourceDirectory>

* <resources>*

* <resource>*

* <directory>src/jvm/resources</directory>*

* </resource>*

* </resources>*

...




On Tue, Feb 25, 2014 at 5:57 PM, Chen Wang <[email protected]>wrote:

> Hi, folks,
> I am sure this is an old question, but was quite a headache for me. I am
> running storm in local mode, with the hbase-site.xml under the source
> folder so the folder structure looks like:
>
> myproject
>   |_src
>      |_jvm
>   |_hbase-site.xml
>
> I also tried other lay out like
> myproject
>   |_src
>      |_jvm
>         |_hbase-site.xml
> and
> myproject
>   |_src
>      |_jvm
>   |_resources
>         |_hbase-site.xml
>
> But the toplogy does not seem to  pick up hbase-site.xml. The log still
> shows that.
>  Initializing connection to HBase table mytable at
> file:///tmp/hbase-myusername/hbase from null
>
> My package is a uber jar with all the dependencies.  I am sure it's
> classpath issue, but need some guidance on how to trouble shoot this. I
> even tried to put hbase-site.xml under storm/lib, with no luck.
> I am simply using HBaseConfiguration
>
>  this.conf = HBaseConfiguration.create();
>
>  LOG.info(String.format(
>
>   "Initializing connection to HBase table %s at %s",
>
>   tableName, this.conf.get("hbase.rootdir")));
>
> Any help appreciated.
>
> Chen
>
>
>

Reply via email to