Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RESTHandler update ignores null values

    SmartClient Version: v13.1p_2024-11-16/Enterprise Deployment (built 2024-11-16)
    and
    SmartClient Version: v13.0p_2024-11-16/Enterprise Deployment (built 2024-11-16)

    Hello, I just noticed that the RESTHandler is ignoring a null value in an update operation, see the log with a null value for DATA_CHIUSURA:

    Code:
    2024-11-19T12:35:56,368 [ ] INFO JasRESTHandler Handling REST request
    2024-11-19T12:35:56,487 [ ] DEBUG RestRequestParser Parsing json object: '{
        "dataSource" : "OSS_OSSERVAZIONI_REST",
        "operationType" : "update",
        "operationId": "prova",
        "data" : {"ID_REC":9782348, "DATA_CHIUSURA":null}
    }'
    2024-11-19T12:35:56,604 [ ] WARN Validation attribute 'xmlns' is not declared in Component Schema '{DataSource.ds.xml}' and strict mode is enabled. See 'Strict Mode' overview in the documentation for details.DataSource /DataSource[@ID=OSS_OSSERVAZIONI_REST]
    2024-11-19T12:35:56,618 [ ] DEBUG PoolManager Invalidating null object for key 'fmt:bundle
    2024-11-19T12:35:56,648 [ ] DEBUG PoolManager Invalidating null object for key 'operationBinding
    2024-11-19T12:35:56,714 [ ] INFO JasRESTHandler Performing 1 operation(s)
    2024-11-19T12:35:56,714 [ ] WARN JasRESTHandler entra in handleDSRequest
    2024-11-19T12:35:56,714 [ ] WARN JasRESTHandler Richiesta REST, metodo = POST
    2024-11-19T12:35:56,720 [ ] INFO DSRequest Executing OSS_OSSERVAZIONI_REST.update[prova] with
    criteria: {ID_REC:9782348}
    values: {ID_REC:9782348}
    2024-11-19T12:35:56,797 [ ] DEBUG AppBase No userTypes defined, allowing anyone access to all operations for this application
    2024-11-19T12:35:56,801 [ ] DEBUG AppBase No public zero-argument method named '_prova' found, performing generic datasource operation
    2024-11-19T12:35:58,559 [ ] DEBUG SQLDataSource DataSource 514 acquired SQLDriver instance 1733340698 during initialization
    2024-11-19T12:35:58,566 [ ] DEBUG SQLDataSource In getSchemaName(); for DataSource OSS_OSSERVAZIONI_REST
    2024-11-19T12:35:58,566 [ ] DEBUG SQLDataSource 'schema' retrieved from config is 'DBJAS'
    2024-11-19T12:35:58,605 [ ] INFO Velocity Velocity Tools not available - using standard Velocity Contexts.
    2024-11-19T12:35:58,632 [ ] DEBUG velocity Initializing Velocity, Calling init()...
    2024-11-19T12:35:58,632 [ ] DEBUG velocity Starting Apache Velocity v2.3
    2024-11-19T12:35:58,637 [ ] DEBUG velocity Default Properties resource: org/apache/velocity/runtime/defaults/velocity.properties
    2024-11-19T12:35:58,651 [ ] DEBUG Velocity ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
    2024-11-19T12:35:58,653 [ ] DEBUG file FileResourceLoader: adding path ''
    2024-11-19T12:35:58,655 [ ] DEBUG Velocity initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) with class java.util.Collections$SynchronizedMap cache map.
    2024-11-19T12:35:58,657 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Stop
    2024-11-19T12:35:58,658 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Define
    2024-11-19T12:35:58,659 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Break
    2024-11-19T12:35:58,659 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Evaluate
    2024-11-19T12:35:58,660 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Macro
    2024-11-19T12:35:58,661 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Parse
    2024-11-19T12:35:58,661 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Include
    2024-11-19T12:35:58,662 [ ] DEBUG Velocity Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
    2024-11-19T12:35:58,686 [ ] DEBUG parser Created '20' parsers.
    2024-11-19T12:35:58,713 [ ] DEBUG macro "velocimacro.library.path" is not set. Trying default library: velocimacros.vtl
    2024-11-19T12:35:58,716 [ ] DEBUG macro Default library velocimacros.vtl not found. Trying old default library: VM_global_library.vm
    2024-11-19T12:35:58,717 [ ] DEBUG macro Old default library VM_global_library.vm not found.
    2024-11-19T12:35:58,717 [ ] DEBUG macro allowInline = true: VMs can be defined inline in templates
    2024-11-19T12:35:58,717 [ ] DEBUG macro allowInlineToOverride = false: VMs defined inline may NOT replace previous VM definitions
    2024-11-19T12:35:58,717 [ ] DEBUG macro allowInlineLocal = false: VMs defined inline will be global in scope if allowed.
    2024-11-19T12:35:58,717 [ ] DEBUG macro autoload off: VM system will not automatically reload global library macros
    2024-11-19T12:35:58,867 [ ] INFO PoolManager SmartClient pooling disabled for 'dbJas' objects
    2024-11-19T12:35:58,867 [ ] DEBUG PoolableSQLConnectionFactory makeObject() created an unpooled Connection '797298725'
    2024-11-19T12:35:58,867 [ ] DEBUG SQLConnectionManager Borrowed connection '797298725' from DBCP
    2024-11-19T12:35:58,871 [ ] DEBUG SQLTransaction Started new dbJas transaction "797298725"
    2024-11-19T12:35:58,871 [ ] DEBUG SQLDataSource Setting DSRequest as being part of a transaction on connection 797298725
    2024-11-19T12:35:58,873 [ ] INFO SQL Executing SQL query on 'dbJas': UPDATE DBJAS.OSS_OSSERVAZIONI SET ID_REC=9782348 WHERE (OSS_OSSERVAZIONI.ID_REC=9782348)
    2024-11-19T12:35:58,921 [ ] INFO DSRequest Switching cacheSyncTiming to 'immediate' because this is a client 'update' request (dataSource is 'OSS_OSSERVAZIONI_REST')
    2024-11-19T12:35:58,924 [ ] INFO DSRequest primaryKeys: {ID_REC=9782348}
    2024-11-19T12:35:58,924 [ ] DEBUG SQLDataSource Gathered all keys. lastPrimaryKeys is now {ID_REC=9782348}
    2024-11-19T12:35:58,924 [ ] DEBUG SQLDataSource update operation affected 1 rows
    2024-11-19T12:35:58,924 [ ] DEBUG SQLDataSource In getSchemaName(); for DataSource OSS_OSSERVAZIONI_REST
    2024-11-19T12:35:58,924 [ ] DEBUG SQLDataSource 'schema' retrieved from config is 'DBJAS'
    2024-11-19T12:35:58,927 [ ] INFO DSRequest Executing OSS_OSSERVAZIONI_REST.fetch rows: 0->-1 with
    criteria: {ID_REC:9782348}
    2024-11-19T12:35:58,929 [ ] DEBUG AppBase No userTypes defined, allowing anyone access to all operations for this application
    2024-11-19T12:35:58,929 [ ] DEBUG AppBase No public zero-argument method named '_null' found, performing generic datasource operation
    2024-11-19T12:35:58,936 [ ] DEBUG SQLDataSource In getSchemaName(); for DataSource OSS_OSSERVAZIONI_REST
    2024-11-19T12:35:58,936 [ ] DEBUG SQLDataSource 'schema' retrieved from config is 'DBJAS'
    2024-11-19T12:35:58,937 [ ] DEBUG SQLDataSource JDBC driver windowed select rows 0->-1, result size 1. Query: SELECT OSS_OSSERVAZIONI.ID_REC, OSS_OSSERVAZIONI.DATA_CHIUSURA FROM DBJAS.OSS_OSSERVAZIONI WHERE (OSS_OSSERVAZIONI.ID_REC=9782348)
    2024-11-19T12:35:58,938 [ ] DEBUG SQLDataSource Setting DSRequest as being part of a transaction on connection 797298725
    2024-11-19T12:35:58,989 [ ] DEBUG SQLDataSource Using paging strategy 'jdbcScroll' - scrolling to absolute position 1
    2024-11-19T12:35:58,991 [ ] DEBUG SQLDataSource Scrolling / positioning took 3ms
    2024-11-19T12:35:58,998 [ ] INFO DSResponse DSResponse: List with 1 items

    #2
    Hi, could you please confirm if you see the issue or if you need a test case?

    Comment


      #3
      Hello, any news about this issue?

      Comment


        #4
        A change has now been made to fix this issue in version 13.1 and later. The fix will be present in builds dated as of tomorrow, December 17.

        Comment


          #5
          Hello, could you please port the fix to 13.0 also?

          Comment


            #6
            OK, that is also done

            Comment


              #7
              SmartClient Version: v13.0p_2024-12-17/Enterprise Deployment (built 2024-12-17)

              I can confirm it's fixed, thank you very much

              Comment

              Working...
              X