[midPoint] scriptedSQL connector issue

Peter Holes pholes at gmail.com
Wed Jun 26 10:35:22 CEST 2019


Hi All,

I would like to discuss an issue with ScriptedSQL connector, maybe
somebody facing similar issue.. or my DB or midpoint configuration is
not relevant.

I am using an ScriptedSQL connector (v2.0) and midPoint 3.9, the
version 2.1 on github has errors (unable to build the connector, due
dependency issues). I try to prepare a searchScript.groovy based on
samples, which pull data from SQL table.
I have something like this:

##
..
def sql = new Sql(connection)
def result = [];

log.info('### objectClass:' + objectClass);

switch ( objectClass ) {
case "ObjectClass: __ACCOUNT__":
sql.eachRow("SELECT * FROM egje.dbo.employees where EMAIL is not NULL
AND USERNAME is not NULL", {
result.add([__UID__:it.OSCPV, __NAME__:it.OSCPV,
givenname:it.GIVENNAME, lastname:it.FAMILYNAME, username:it.USERNAME,
email:it.EMAIL])
log.info("### [ScriptedSQL] attributes:oscpv:{0},givenname:
{1},familyName: {2},username: {3},email: {4}",
it.OSCPV,it.GIVENNAME,it.FAMILYNAME,it.USERNAME,it.EMAIL)
})
default:
result;
}
//log.info('### nothing to do...{}', result);
return result;
..
##

I try to read the data to midPoint and create shadows (through browse
myResource>Accoutns>Repository), but I get the errors in log file:
"Paged search is requested, but the filtered results handler is
enabled in effective (i.e. non-validation) mode. This is not
supported."

so, I update the resource configuration like this:

<icfc:resultsHandlerConfiguration>
<icfc:enableNormalizingResultsHandler>false</icfc:enableNormalizingResultsHandler>
    <icfc:enableFilteredResultsHandler>false</icfc:enableFilteredResultsHandler>
    <icfc:filteredResultsHandlerInValidationMode>true</icfc:filteredResultsHandlerInValidationMode>
    <icfc:enableAttributesToGetSearchResultsHandler>false</icfc:enableAttributesToGetSearchResultsHandler>
</icfc:resultsHandlerConfiguration>

and extends 2 resource capabilities:

<cap:pagedSearch/>

<cap:countObjects>
<cap:simulate>pagedSearchEstimate</cap:simulate>
</cap:countObjects>

can anybody help, how to figure out of this issue?

Thx for help.

Peter.



More information about the midPoint mailing list