# I am getting NullpointerException ResourceServiceBroker

**URL:** <https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [November 27, 2019, 12:13pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602 "2019-11-27T12:13:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 27, 2019, 12:13pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/1 "2019-11-27T12:13:46Z")

</div>

Hi All,

ResourceServiceBroker broker = HippoServiceRegistry.getService(ResourceServiceBroker.class);

We are using CMS 11.2.0 version, configured crisp api for external calls.  
I am using 1.0.4 version of **CRISP API.**  
I am getting NullpointerException, do i need to do any configuration for this, please let me know the steps.

I am using hippo-services:3.2.0 version for ResourceServiceBroker.

thanks & regards  
Ganesh

---

<div class="post-metadata">

**Author:** ![giacomolm](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/giacomolm/32/1733_2.png) [@giacomolm](https://community.bloomreach.com/u/giacomolm)\
**Post date:** [November 27, 2019, 12:36pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/2 "2019-11-27T12:36:47Z")

</div>

Hi,  
what about using CrispHstServices instead, something like

```
ResourceServiceBroker broker = CrispHstServices.getDefaultResourceServiceBroker();

```

Does this work for you?

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 27, 2019, 12:48pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/3 "2019-11-27T12:48:46Z")

</div>

HI Giacomolm,

It’s works for, i am getting another exception :  
Caused by: java.lang.NoClassDefFoundError: org/hippoecm/hst/site/HstServices

I have added maven dependencies but no use.

please let me know, what i have to do here.

thanks & regards  
Ganesh

---

<div class="post-metadata">

**Author:** ![giacomolm](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/giacomolm/32/1733_2.png) [@giacomolm](https://community.bloomreach.com/u/giacomolm)\
**Post date:** [November 27, 2019, 1:15pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/4 "2019-11-27T13:15:37Z")

</div>

Are you trying to use CRISP within your site application, as example from an HST component?

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 27, 2019, 2:25pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/5 "2019-11-27T14:25:51Z")

</div>

Hi Giacomolm,

thank you.  
I have removed that dependency from site module, but still getting same kind of stuff.

] Caused by: java.lang.NoClassDefFoundError: org/hippoecm/hst/site/HstServices

[**INFO**] [talledLocalContainer] at org.onehippo.cms7.crisp.hst.module.CrispHstServices.getModuleComponent(CrispHstServices.java:50)

thanks & regards  
Ganesh

---

<div class="post-metadata">

**Author:** ![giacomolm](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/giacomolm/32/1733_2.png) [@giacomolm](https://community.bloomreach.com/u/giacomolm)\
**Post date:** [November 27, 2019, 2:37pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/6 "2019-11-27T14:37:32Z")

</div>

Hi,  
I would suggest to have a look at the crisp demo project freely available here [1]

Specifically I would like suggest to check 2 things:

- If the CRISP dependencies defined in your project are correct: please compare them with the example here [2]
- if the CRISP library is used as expected inside your HST components: please check this here [3]

HTH

[1] [https://code.onehippo.org/cms-community/hippo-addon-crisp/tree/hippo-addon-crisp-1.0.4/demo](https://code.onehippo.org/cms-community/hippo-addon-crisp/tree/hippo-addon-crisp-1.0.4/demo)  
[2] [https://code.onehippo.org/cms-community/hippo-addon-crisp/blob/hippo-addon-crisp-1.0.4/demo/site/pom.xml](https://code.onehippo.org/cms-community/hippo-addon-crisp/blob/hippo-addon-crisp-1.0.4/demo/site/pom.xml)  
[3] [https://code.onehippo.org/cms-community/hippo-addon-crisp/blob/hippo-addon-crisp-1.0.4/demo/site/src/main/java/org/onehippo/cms7/crisp/demo/components/NewsContentComponent.java](https://code.onehippo.org/cms-community/hippo-addon-crisp/blob/hippo-addon-crisp-1.0.4/demo/site/src/main/java/org/onehippo/cms7/crisp/demo/components/NewsContentComponent.java)

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [November 27, 2019, 7:15pm UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/7 "2019-11-27T19:15:15Z")

</div>

Hi Ganesh,

`HstServices` class is in hst-commons-\*.jar. So try to find where the jar is located in your (local cargo) tomcat folder. Also, compare it with the demo project when you run the demo project for v11.

Regards,

Woonsan

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 28, 2019, 3:00am UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/8 "2019-11-28T03:00:57Z")

</div>

HI Giacomolm,

thanks for your time and support, i will try and let you know.

regards  
Ganesh

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 28, 2019, 3:02am UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/9 "2019-11-28T03:02:00Z")

</div>

Hi Woonsanko,

thank you, i will try and get back to you.

regards  
Ganesh

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 28, 2019, 5:58am UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/10 "2019-11-28T05:58:34Z")

</div>

Hi Woonsanko,

i am getting below exception, please let me know what i have to do to fix this.

Caused by: java.lang.IllegalStateException: HST Services unavailable.

[**INFO**] [talledLocalContainer] at org.onehippo.cms7.crisp.hst.module.CrispHstServices.getModuleComponent(CrispHstServices.java:51)

[**INFO**] [talledLocalContainer] at org.onehippo.cms7.crisp.hst.module.CrispHstServices.getDefaultResourceServiceBroker(CrispHstServices.java:64)

[**INFO**] [talledLocalContainer] at com.lbrands.cms.facade.MasterStyleIdFacade.findDocumentById(MasterStyleIdFacade.java:158)

[**INFO**] [talledLocalContainer] at com.lbrands.cms.facade.MasterStyleIdFacade.getFieldExternalDocuments(MasterStyleIdFacade.java:89)

thanks & regards  
Gaensh

---

<div class="post-metadata">

**Author:** ![ganeshraju1984](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/ganeshraju1984/32/494_2.png) [@ganeshraju1984](https://community.bloomreach.com/u/ganeshraju1984)\
**Post date:** [November 28, 2019, 7:27am UTC](https://community.bloomreach.com/t/i-am-getting-nullpointerexception-resourceservicebroker/1602/13 "2019-11-28T07:27:45Z")

</div>

HI Giacomolm,

i am getting below exception, please let me know what i have to do to fix this.

Caused by: java.lang.IllegalStateException: HST Services unavailable.

[**INFO**] [talledLocalContainer] at org.onehippo.cms7.crisp.hst.module.CrispHstServices.getModuleComponent(CrispHstServices.java:51)

[**INFO**] [talledLocalContainer] at org.onehippo.cms7.crisp.hst.module.CrispHstServices.getDefaultResourceServiceBroker(CrispHstServices.java:64)

[**INFO**] [talledLocalContainer] at com.lbrands.cms.facade.MasterStyleIdFacade.findDocumentById(MasterStyleIdFacade.java:158)

[**INFO**] [talledLocalContainer] at com.lbrands.cms.facade.MasterStyleIdFacade.getFieldExternalDocuments(MasterStyleIdFacade.java:89)

thanks & regards  
Gaensh
