# Custom Search Attribute not working with java sdk

**URL:** <https://community.temporal.io/t/custom-search-attribute-not-working-with-java-sdk/8567>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [June 19, 2023, 10:57am UTC](https://community.temporal.io/t/custom-search-attribute-not-working-with-java-sdk/8567 "2023-06-19T10:57:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_kumar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vikas_kumar/32/3466_2.png) [@vikas\_kumar](https://community.temporal.io/u/vikas_kumar)\
**Post date:** [June 19, 2023, 10:57am UTC](https://community.temporal.io/t/custom-search-attribute-not-working-with-java-sdk/8567/1 "2023-06-19T10:57:50Z")

</div>

Hi All,  
I am exploring custom search attribute of temporal for one of our use cases where we want to search all the related workflows using custom search attributes.

While running the workflow with custom search attributes I am getting error  
“: io.grpc.StatusRuntimeException: INVALID\_ARGUMENT: Namespace default has no mapping defined for search attribute productLinkageId”

here productLinkageId is one of the search attribute.

I am using docker-compose-postgres.yml to install temporal on mac.

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [June 19, 2023, 1:36pm UTC](https://community.temporal.io/t/custom-search-attribute-not-working-with-java-sdk/8567/2 "2023-06-19T13:36:39Z")

</div>

Hello @vikas_kumar

Have you registered the new search attribute in the `default` namespace?

> **[Temporal CLI operator command reference | Temporal Documentation](https://docs.temporal.io/cli/operator)**
>
> How to use the Temporal CLI operator commands

eg.  
`temporal operator search-attribute create --namespace default --name my-sa --type Text `

You can get the sa in the namespace with `temporal operator search-attribute list --namespace default`

Antonio

---

<div class="post-metadata">

**Author:** ![vikas\_kumar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vikas_kumar/32/3466_2.png) [@vikas\_kumar](https://community.temporal.io/u/vikas_kumar)\
**Post date:** [June 19, 2023, 7:23pm UTC](https://community.temporal.io/t/custom-search-attribute-not-working-with-java-sdk/8567/3 "2023-06-19T19:23:16Z")

</div>

Thank you, @antonio.perez, for your prompt response.

The solution you provided resolved the issue for me. I appreciate your assistance.
