Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1381

Method Expressions not validated at deployment time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 1.9.0
    • None
    • Data-Module
    • None
    • JDK 8
      Postgres 10
      Hibernate 5.3.6
      WildFly 13.0.0

    Description

      In the documentation it's explicitly mentioned that method expressions are validated upon deployment to see if there is any typo in them: 

      Note that DeltaSpike will validate those expressions during startup, so you will notice early in case you have a typo in those expressions.

       

      But seems this validation doesn't happen during deployment and the code fails when the given method is being called. In the following example, the "LessThan" comparator is misspelled and the stack trace of the runtime error is as below:

       

      Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed calling Repository: [Repository=com.one.paymentgateway.persistence.repository.PendingCaptureRepository,entity=com.one.paymentgateway.persistence.entity.PendingCaptureEntity,method=findAnyByPendingTimeLesThanEqualsOrderByPendingTime,
      at org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:83)
      at org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:57)
      at org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder$Proxy$_$$_WeldClientProxy.executeQuery(Unknown Source)
      at org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:62)
      at org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:57)
      at org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner$Proxy$_$$_WeldClientProxy.executeQuery(Unknown Source)
      at org.apache.deltaspike.data.impl.handler.QueryHandler.process(QueryHandler.java:151)
      ... 161 more

      Attachments

        Activity

          People

            Unassigned Unassigned
            moghaddam Ehsan Zaery Moghaddam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: