java.lang.IllegalArgumentException: Property must not null or empty!

Spring JIRA | Michal Ondrovic | 1 year ago
  1. 0

    Using StringPath(String var) with spring data 1.8.x or newer causes IllegalArgumentException

    GitHub | 1 year ago | anaq1
    java.lang.IllegalArgumentException: Property must not null or empty!
  2. 0

    In version 1.8.x was changed the way property path is resolved in class {{QSort}}. There is a private method {{preparePropertyPath(.)}}, which should return the correct path. But if the parent is {{null}}, it returns an empty {{String}} and this is probably not correct. For example when I use Querydsl {{StringPath}} like this: {code:java} QSort sort = new QSort(new OrderSpecifier<>(com.mysema.query.types.Order.ASC, new StringPath("eventTime"))); {code} an {{IllegalArgumentException}} is thrown: {noformat} java.lang.IllegalArgumentException: Property must not null or empty! at org.springframework.data.domain.Sort$Order.<init>(Sort.java:320) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.domain.Sort$Order.<init>(Sort.java:282) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.domain.Sort$Order.<init>(Sort.java:304) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.toOrder(QSort.java:98) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.toOrders(QSort.java:76) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.<init>(QSort.java:59) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.<init>(QSort.java:50) ~[spring-data-commons-1.9.3.RELEASE.jar:na] … {noformat} In version 1.7.x is it working as expected, no parent is needed. The recursion method {{preparePropertyPath(…)}} should be fixed.

    Spring JIRA | 1 year ago | Michal Ondrovic
    java.lang.IllegalArgumentException: Property must not null or empty!
  3. 0

    In version 1.8.x was changed the way property path is resolved in class {{QSort}}. There is a private method {{preparePropertyPath(.)}}, which should return the correct path. But if the parent is {{null}}, it returns an empty {{String}} and this is probably not correct. For example when I use Querydsl {{StringPath}} like this: {code:java} QSort sort = new QSort(new OrderSpecifier<>(com.mysema.query.types.Order.ASC, new StringPath("eventTime"))); {code} an {{IllegalArgumentException}} is thrown: {noformat} java.lang.IllegalArgumentException: Property must not null or empty! at org.springframework.data.domain.Sort$Order.<init>(Sort.java:320) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.domain.Sort$Order.<init>(Sort.java:282) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.domain.Sort$Order.<init>(Sort.java:304) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.toOrder(QSort.java:98) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.toOrders(QSort.java:76) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.<init>(QSort.java:59) ~[spring-data-commons-1.9.3.RELEASE.jar:na] at org.springframework.data.querydsl.QSort.<init>(QSort.java:50) ~[spring-data-commons-1.9.3.RELEASE.jar:na] … {noformat} In version 1.7.x is it working as expected, no parent is needed. The recursion method {{preparePropertyPath(…)}} should be fixed.

    Spring JIRA | 1 year ago | Michal Ondrovic
    java.lang.IllegalArgumentException: Property must not null or empty!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [DATAREST-377] UriStringDeserializer fails with "Could not read JSON: Template must not be null or empty!" - Spring JIRA

    spring.io | 11 months ago
    com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.enterprise.platform.persistence.entity.FatturaCliente )
  6. 0

    [DATAREST-377] UriStringDeserializer fails with "Could not read JSON: Template must not be null or empty!" - Spring JIRA

    spring.io | 5 months ago
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Template must not be null or empty! (through reference chain: com.enterprise.platform.persistence.entity.FatturaCliente ["tipoDocumento"] ); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.enterprise.platform.persistence.entity.FatturaCliente ["tipoDocumento"] )

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Property must not null or empty!

      at org.springframework.data.domain.Sort$Order.<init>()
    2. Spring Data Core
      QSort.<init>
      1. org.springframework.data.domain.Sort$Order.<init>(Sort.java:320)[spring-data-commons-1.9.3.RELEASE.jar:na]
      2. org.springframework.data.domain.Sort$Order.<init>(Sort.java:282)[spring-data-commons-1.9.3.RELEASE.jar:na]
      3. org.springframework.data.domain.Sort$Order.<init>(Sort.java:304)[spring-data-commons-1.9.3.RELEASE.jar:na]
      4. org.springframework.data.querydsl.QSort.toOrder(QSort.java:98)[spring-data-commons-1.9.3.RELEASE.jar:na]
      5. org.springframework.data.querydsl.QSort.toOrders(QSort.java:76)[spring-data-commons-1.9.3.RELEASE.jar:na]
      6. org.springframework.data.querydsl.QSort.<init>(QSort.java:59)[spring-data-commons-1.9.3.RELEASE.jar:na]
      7. org.springframework.data.querydsl.QSort.<init>(QSort.java:50)[spring-data-commons-1.9.3.RELEASE.jar:na]
      7 frames