Project

General

Profile

Actions

Defect #1916

closed

Support delete synchronization token from GUI

Added by Vladimír Kotýnek over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Vít Švanda
Category:
Systems
Target version:
Start date:
10/30/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

version 9.7.10

How to reproduce:
Create a system configuration using standard database table connector
configure one attribute as timestamp with data type in schema java.sql.Timestamp
Configure a synchronization mapping and synchronization configuration (not recontiliation) for this system
Run the synchronization, stop it after a while
Go to sync. config and delete the value of the token.
Re-Run the sync.
It will crash with fallowing message:

Synchronization was started in 2019-10-30T14:33:19.935.
-------------------------
Synchronization will use inner connector synchronization implementation.
-------------------------
Error during synchronization
-------------------------
org.identityconnectors.framework.common.exceptions.ConnectorException: Can not read from the table or view 'name_of_the_table'.
    at net.tirasa.connid.bundles.db.table.DatabaseTableConnector.sync(DatabaseTableConnector.java:766)
    at org.identityconnectors.framework.impl.api.local.operations.SyncImpl.sync(SyncImpl.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)
    at com.sun.proxy.$Proxy386.sync(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
    at com.sun.proxy.$Proxy386.sync(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.identityconnectors.framework.impl.api.BufferedResultsProxy$BufferedResultsHandler.run(BufferedResultsProxy.java:165)
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: timestamp without time zone > character varying
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 158

The problem seems to be that the empty form field from GUI is saved as some white character or an empty string. But this is just a theory, not confirmed.

Actions #1

Updated by Vladimír Kotýnek over 4 years ago

  • Subject changed from Support delete synchronization token fro GUI to Support delete synchronization token from GUI
Actions #2

Updated by Vít Švanda over 4 years ago

  • Target version set to 10.0.0
Actions #3

Updated by Vít Švanda over 4 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Vít Švanda over 4 years ago

  • Tracker changed from Task to Defect
  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • Target version changed from 10.0.0 to Rhyolite (9.7.12)
  • % Done changed from 0 to 90

I reproduced this issue too. If token is deleted from the GUI, then empty string is persist and TableConnector doesn't provide check on empty string. I implemented check on empty string directlly in start of sync ... so IcSyncToken is null if token is null or empty now.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/5b9d6c0cbd9bfda8aca3bb2245c57e2c5b3ef2ea

Actions #5

Updated by Radek Tomiška over 4 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

I did test and review, it works and code is nice, thx!

Actions #6

Updated by Radek Tomiška over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF