# Cannot find serializer for value!r

**URL:** <https://forum.camunda.io/t/cannot-find-serializer-for-value-r/51502>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [March 30, 2024, 11:22am UTC](https://forum.camunda.io/t/cannot-find-serializer-for-value-r/51502 "2024-03-30T11:22:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MEHMET\_YILDIRIM](https://forum.camunda.io/user_avatar/forum.camunda.io/mehmet_yildirim/32/26929_2.png) [@MEHMET\_YILDIRIM](https://forum.camunda.io/u/MEHMET_YILDIRIM)\
**Post date:** [March 30, 2024, 11:22am UTC](https://forum.camunda.io/t/cannot-find-serializer-for-value-r/51502/1 "2024-03-30T11:22:58Z")

</div>

Hi,  
I have a simple workflow. A user form has one text field called item and one number field called amount . When starting the Process I set the inital values.  
In the externalTaskClient I want to catch these values. But the number field causes an error  
String item = externalTask.getVariable(“item”); // THIS WORKS  
**Integer amount = (Integer) externalTask.getVariable(“amount”); // THIS DOESN’T**

[TopicSubscriptionManager] ERROR org.camunda.bpm.client - TASK/CLIENT-03004 Exception on external task service method invocation for topic ‘charge-card’:  
org.camunda.bpm.client.exception.ValueMapperException: TASK/CLIENT-01024 **Cannot find serializer for value ‘8’**  
at org.camunda.bpm.client.impl.ExternalTaskClientLogger.valueMapperExceptionDueToSerializerNotFoundForTypedValueField(ExternalTaskClientLogger.java:197)  
at org.camunda.bpm.client.variable.impl.DefaultValueMappers.findMapperForTypedValueField(DefaultValueMappers.java:82)  
at org.camunda.bpm.client.variable.impl.VariableValue.getSerializer(VariableValue.java:77)  
at org.camunda.bpm.client.variable.impl.VariableValue.getTypedValue(VariableValue.java:62)  
at org.camunda.bpm.client.variable.impl.VariableValue.getTypedValue(VariableValue.java:50)  
at org.camunda.bpm.client.variable.impl.VariableValue.getValue(VariableValue.java:41)  
at org.camunda.bpm.client.task.impl.ExternalTaskImpl.getVariable(ExternalTaskImpl.java:250)  
at ChargeCardWorker.lambda$0(ChargeCardWorker.java:27)  
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.handleExternalTask(TopicSubscriptionManager.java:155)  
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.lambda$acquire$0(TopicSubscriptionManager.java:109)  
at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4204)  
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.acquire(TopicSubscriptionManager.java:104)  
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.run(TopicSubscriptionManager.java:88)  
at java.base/java.lang.Thread.run(Thread.java:833)

---

<div class="post-metadata">

**Author:** ![WilliamR.Alves](https://forum.camunda.io/user_avatar/forum.camunda.io/williamr.alves/32/27412_2.png) [@WilliamR.Alves](https://forum.camunda.io/u/WilliamR.Alves)\
**Post date:** [April 1, 2024, 1:17am UTC](https://forum.camunda.io/t/cannot-find-serializer-for-value-r/51502/2 "2024-04-01T01:17:31Z")

</div>

Hello my friend!

You may be casting a variable that may not be of type Integer… try using `getVariableTyped()` to get the value of this variable.

I hope this helps.

**William Robert Alves**
