Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error: An error occurred while executing a smart service: An error occurred while trying to write to the entity "EO_EmployeeData" [id=9e4

Could not display interface. Please check definition and inputs.

Interface Definition: Expression evaluation error: An error occurred while executing a smart service: An error occurred while trying to write to the entity "EO_EmployeeData" [id=9e48e7c6-a034-4954-98db-450e8558d1bf@4713, type=EO_EmployeeData (id=4046)] (data store: EO Data Store). Details: org.hibernate.exception.GenericJDBCException: could not insert: [EOEmployeeDataDT5986]: java.sql.SQLTransientConnectionException: (conn=42215) Field 'a_id' doesn't have a default value: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Field 'a_id' doesn't have a default value: java.sql.SQLException: Field 'a_id' doesn't have a default value Data: TypedValue[it=4046,v={<null>,DEVESH KUMAR,2022-07-26,GZB,up,IND,,2022-08-02,2022-08-11,2022,1,1,<null>,<null>,}] This error will not be displayed to the user viewing this form. Click here to dismiss the error message and see the resulting interface.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    <xsd:element name="id" nillable="true" type="xsd:int">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">@Id @GeneratedValue</xsd:appinfo>
    </xsd:annotation>
    </xsd:element>

    Set autogenerated for the primary key column.

  • Adding to what Ujjwal said, and to explain this thing for better clarity; Appian's CDT and the table connected to it always need a Primary Key column to perform CRUD operations. Without a primary key column, CRUD is not possible via Appian smart services. Now to make the work easier and not manually take care of the order of values in the Primary Key column, we always mark it as auto-generated. When you mark it as auto-generated, then you can leave that column as NULL and it will be auto-generated. In your case, you did not create a primary key column so Appian auto-created it with the name a_id and that was not marked as auto-generated. Hence you receive this error. 

    You can do 2 things about it. 

    1. Re-create the entire CDT and the table, and add a Primary key column with auto-generated configuration. 
    2. Fix the existing CDT by accessing its XSD and following Ujjwal's steps. 
Reply
  • Adding to what Ujjwal said, and to explain this thing for better clarity; Appian's CDT and the table connected to it always need a Primary Key column to perform CRUD operations. Without a primary key column, CRUD is not possible via Appian smart services. Now to make the work easier and not manually take care of the order of values in the Primary Key column, we always mark it as auto-generated. When you mark it as auto-generated, then you can leave that column as NULL and it will be auto-generated. In your case, you did not create a primary key column so Appian auto-created it with the name a_id and that was not marked as auto-generated. Hence you receive this error. 

    You can do 2 things about it. 

    1. Re-create the entire CDT and the table, and add a Primary key column with auto-generated configuration. 
    2. Fix the existing CDT by accessing its XSD and following Ujjwal's steps. 
Children
No Data