03/27/2023 07:50 AM
Hey Techies,
I have configured a .sav file to upload users and want to validate email uniqueness against 1. Saviynt and 2. AD(all the domains) before assigning it to the respective user. To achieve this I configured an In-line preprocessor to trigger a custom Jar. But somehow I am getting an error saying Class not found.
I did following steps:
1. Created a jar file compiled on Java Version 1.8
2. Uploaded the Jar from File Directory under External Jar.
3. Created a inline JSON :
{
"ADDITIONALTABLES": {
"USERS": "SELECT * FROM USERS"
},
"COMPUTEDCOLUMNS": [
"CUSTOMPROPERTY50"
],
"PREPROCESSQUERIES": [
"CUSTOMFUNCTION###FUNCTION1"
],
"CUSTOMFUNCTIONS": {
"FUNCTION1": {
"FULLCLASSNAME": "com.saviynt.utility.connection.EmailGenerationHandler",
"METHODNAME": "doCustomPreprocess"
}
}
}
We are not consuming AD's check for unique as we want to generate and assign email to the user during its creation and before provisioning it to AD.
2022.x
regards,
Sugandha
03/27/2023 08:09 AM - edited 03/27/2023 08:12 AM
Did you upload the custom jar to Saviynt and then restarted the application?
If not please upload the custom jar to Saviynt under location Admin -> Settings -> File Directory -> External JARs and then use Upload New File Option to upload the JAR
03/27/2023 11:03 AM
Yes I have followed all the steps.
03/27/2023 09:04 AM
I would like to inquire whether you have successfully uploaded the custom jar to Saviynt and restarted the application. If not, I kindly suggest that you upload the custom jar to Saviynt by navigating to the Admin -> Settings -> File Directory -> External JARs location and using the "Upload New File" option to upload the JAR.
03/27/2023 11:08 AM
Yes I have followed Admin -> Settings -> File Directory -> External JARs and restarted the Application.
I was able to consume Java file present in
the logic worked for me. But as soon as I uploaded my own class it errored out. Am I missing any configuration?
03/27/2023 11:25 AM
Pls share the MODIFYUSERDATAJSON, Logs
03/27/2023 11:52 AM
{
"ADDITIONALTABLES": {
"USERS": "SELECT * FROM USERS"
},
"COMPUTEDCOLUMNS": [
"CUSTOMPROPERTY50"
],
"PREPROCESSQUERIES": [
"CUSTOMFUNCTION###FUNCTION1"
],
"CUSTOMFUNCTIONS": {
"FUNCTION1": {
"FULLCLASSNAME": "com.saviynt.utility.connection.EmailGenerationHandler",
"METHODNAME": "doCustomPreprocess"
}
}
}
ecm,"2023-03-24T16:24:06.931+00:00","{"log":"java.lang.ClassNotFoundException: com.saviynt.utility.connection.EmailGenerationHandler\n","stream":"stdout","time":"2023-03-24T16:24:06.341114667Z"}"
03/27/2023 12:19 PM
Since you mentioned that you have uploaded new jar and still facing issue after restart. I assume may be it is looking for same class name as mentioned in doc. Did you try building your logic in same class and see if it works? Also make sure that you are not looking for any additional arguments to be passed as this logic doesn't support additional arguments other than default(Connection connection, Map tempTableNamesMap)
03/28/2023 07:11 AM
If I use same class with different logic I can see the logic is picked from the documented code. And I have not added any argument. Replicated what's there in the doc and FAQ. Its just I have created a new class and the class is not getting picked up.
03/28/2023 12:06 PM
Hi @SugandhaVarma ,
Have you added fileDirectory.externalJarPath=/application_instance/custom_code/saviynt/Import/externalJar/ in externalconfig.properties file?
if not please add and restart the service
And also creating indexing for the tables that you are consuming within the preprocess will help system performance
Thanks,
Hemanath J
03/28/2023 01:59 PM - edited 03/28/2023 02:00 PM
Does this look good to you? Or do i need to pass class name as well? it is still giving me same error
ecm,"2023-03-28T20:51:44.766+00:00","{"log":"java.lang.ClassNotFoundException: com.saviynt.utility.connection.EmailGenerationHandler\n","stream":"stdout","time":"2023-03-28T20:51:44.12913909Z"}"
03/31/2023 06:01 AM
@Hemanath any input on this.?
04/04/2023 04:04 AM
@SugandhaVarma - have you done restart after the changes in properties
04/04/2023 11:44 AM - edited 04/04/2023 11:45 AM
Yes, do you think entry looks fine or do i need to mention jar file name as well?
04/04/2023 11:46 AM
@SugandhaVarma can you share your jar?
04/04/2023 12:38 PM
04/06/2023 08:28 AM - edited 04/06/2023 08:29 AM
try with attached one and package name com.saviynt.preprocessor.connection.ConnectionUtlityService
method name doCustomPreprocess