Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-701

Creating property with empty name from json node in Daikon causes IllegalArgumentException

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.21.0
    • None
    • None
    • None
    • All
    • Small

    Description

      There is a util class -
      JsonSchemaUtil. It helps to create properties from json, but with an empty names. After deploying component(new MarkLogic) to this rest server and performing POST request with correct parameters I faced with an issue:

      {
          "code": "Talend_ALL_UNEXPECTED_EXCEPTION",
          "message": "The ComponentService was used to access a property with a null(or empty) property name. Type: before Properties:  -  org.talend.components.marklogic.tmarklogicconnection.MarkLogicConnectionProperties\n
      ...
          "messageTitle": "An unexpected error occurred",
          "cause": "The ComponentService was used to access a property with a null(or empty) property name. Type: before Properties:  -  org.talend.components.marklogic.tmarklogicconnection.MarkLogicConnectionProperties\n
      ...
      }

      It happens in PropertiesDynamicMethodHelper:

      if (propertyName == null || propertyName.isEmpty()) {
                  throw new IllegalArgumentException(
                          "The ComponentService was used to access a property with a null(or empty) property name. Type: " + methodType
                                  + " Properties: " + instance);
              }

      As a workaround I set property name, if it comes empty in constructor, this solves the issue. With this issue may face other components too.

      Attachments

        Activity

          People

            pteyssier pierre teyssier
            mbasiuk Maksym Basiuk (Inactive)
            Maksym Basiuk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: