Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/14/2024 11:08 PM
Hi Team,
We have configured user creation form and used binding variable in one of the attributes sql query. Now we are trying to create users using Saviynt api through postman, but it is throwing sql exception error. It is not able to resolve that binding variable.
Below is the error ,
ava.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{employeeType},"|") and customproperty3=1' at line 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200) at com.saviynt.ecm.services.UsersService$_createUserRequest_closure53.doCall(UsersService.groovy:3125) at com.saviynt.ecm.services.UsersService.createUserRequest(UsersService.groovy:3031) at com.saviynt.ecm.ws.Restfulv5Controller$_closure108.doCall(Restfulv5Controller.groovy:12173) at grails.plugin.springsecurity.rest.RestTokenValidationFilter.processFilterChain(RestTokenValidationFilter.groovy:118) at grails.plugin.springsecurity.rest.RestTokenValidationFilter.doFilter(RestTokenValidationFilter.groovy:84) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFil
Regards,
Supriya
05/15/2024 12:00 AM
@supriya15 can share sql query please
05/15/2024 12:50 AM
Hi @Raghu ,
below is the query
select distinct customername as ID from customer where customproperty1 like concat("|",${employeeType},"|") and customproperty3=1
Regards,
Supriya
05/15/2024 06:28 AM
Share postman screenshot
05/15/2024 06:52 AM
Hi @supriya15, is this query giving result in saviynt UI .. skeptical on double quotes
05/15/2024 06:58 AM
05/15/2024 08:36 AM - edited 05/16/2024 06:41 AM
@supriya15 : Can you change the query as below and see if that works
select distinct customername as ID from customer where customproperty1 like concat('%|',${employeeType},'|%') and customproperty3=1
If still doesn't work can you share you post call screenshot and body you are sending
05/16/2024 03:07 AM - last edited on 05/16/2024 04:23 AM by Sunil
Hi @Saathvik ,
Its not working.
Below is the ss
Regards,
Supriya
[This message has been edited by moderator to mask sensitive info]
05/16/2024 06:41 AM - edited 05/16/2024 06:42 AM
@supriya15 : I have updated the query in my previous comment(I forgot to add % previously). Try the new query, If still didn't can you share the sample value you are storing in customproperty1
05/16/2024 06:55 PM
Share logs when you run postman in case if it does not work