users@hk2.java.net

Re: [Asking]About HK2 CTMTest running failed

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Fri, 01 Mar 2013 15:32:30 +0900

I found a way to run the example successfully as following:

Entering JUnit Configuration(Run As->Run Configurations), Selecting
ClassPath tab and under User Entries, Clicking Add JARs and selecting
ctm-example-2.1.64,jar. Then, Running the junit test will be successful.

I want to know whether team has other way?

Thanks
--Tang

Tang Yong wrote:
> Hi Jwells, Mason,
>
> Today, I checked out hk2 2.1.64 and tried to run CTMTest in eclipse Indigo.
>
> However, while running the example, the test failed and reported that
> NPE happened on CTMTest 76 line,
>
> tenantManager.setCurrentTenant(TenantLocatorGenerator.ALICE);
>
> and tenantManager is null.
>
> And tenantManager is obtained by locator.getService(TenantManager.class);
>
> So, I doubted whether there are something env configuration with me that
> caused HK2 running failed?
>
> Because I can not find more usable info, could you please give some advice?
>
> Thanks
> --Tang
>