Skip to main content
Participating Frequently
Feb 14, 2022 4:11 PM UTC
Question

Write to the data store fails

Hello All,

We had an existing CDT which we recently changed to increase the length of one of the text field. Now writing to the corresponding table is failing with the below error. We have the same code in preproduction and it works fine. Application server log is not giving much details about the issue. Please help if anyone has faced this issue or knows how to fix it. Thank you in advance.

An error occurred while trying to write to the entity “DCM_Product” [id=4623d033-078a-409e-9dac-279520070dfc@1268, type=DCM_Product (id=1943)] (data store: Dynamic Case Management). Details: java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EClassImpl cannot be cast to org.eclipse.emf.ecore.EDataType Data: 

Thanks

Subhashree

    3 replies

    gopalk2865
    Participating Frequently
    Feb 14, 2022 4:16 PM UTC

    Hi Subhashree, just wanted to understand , did you modify the xsd based on db changes ?and tried publishing datastore?

    Participating Frequently
    Feb 14, 2022 4:20 PM UTC

    Hi Gopal,

    yes, we modified the table first, then modified the xsd and published. It is mapping fine and getting published.

    gopalk2865
    Participating Frequently
    Feb 14, 2022 4:37 PM UTC

    This error mostly happens when your data type mismatches. I mean if the a field accepts string but instead it receives different data type. Could you carefully check what kind of value you are saving in this field ?