Skip to main content
Question

Issue BPA/workflow : class java.lang.Integer cannot be cast to class java.math.BigDecimal (java.lang.Integer and java.math.BigDecimal are in module java.base of loader 'bootstrap')

  • October 28, 2025
  • 2 replies
  • 27 views

Forum|alt.badge.img+3
Hello everyone,
I’m trying to update the QtyToIssue value of a line with the QtyRemToIssue value from the header.
I’ve created a BPA (Business Process Automation) that retrieves this value by calling the attached function.
However, when I run it, I get the following error message:
class java.lang.Integer cannot be cast to class java.math.BigDecimal (java.lang.Integer and java.math.BigDecimal are in module java.base of loader 'bootstrap')
It seems there’s a type mismatch when the value is passed between the BPA and the function — probably because the field or variable is defined as Integer instead of BigDecimal.
 Has anyone faced a similar issue or knows how to properly handle this conversion (e.g., using an expression or a to_number() / BigDecimal.valueOf() call in the function)?
Thanks in advance for your help!

 

2 replies

Forum|alt.badge.img+3
  • Do Gooder (Employee)
  • October 28, 2025

@Karim.katif5 

Will this approach work in your case?
 

 


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Partner)
  • October 28, 2025
Same issue