Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/19/2024 03:43 AM
Hello,
I have been trying to run a custom jar job but, every time I run the job I get the class not found exception. I have searched the forum for an answer and followed all the required steps when uploading the custom jar file into our environment. Nothing has worked so I would require some assistance.
I have followed this post:https://forums.saviynt.com/t5/identity-governance/how-to-build-develop-custom-java-jar-solution/m-p/... and quite a few more for information with no help.
Solved! Go to Solution.
08/19/2024 04:22 AM
Hi @Roro , JDK version 8?
Plus create a support ticket to restart the server.
08/19/2024 04:25 AM
Yes JDK version 8 and I will create a ticket to restart server.
Do we need to always raise a ticket for the restart when we change edit the code or is this more of a one time thing?
08/19/2024 04:27 AM - edited 08/19/2024 04:27 AM
@Roro ideally you don't have to but sometimes what I have seen UI restart doesn't load the system properly .. so..
Btw what is the use case to use jar?
08/19/2024 04:36 AM
The case is exactly like this one: https://forums.saviynt.com/t5/identity-governance/how-to-send-csv-file-instead-of-zip-using-sftp-con...
08/19/2024 04:43 AM
@Roro , got it ..
If you find the above answer helpful please accept as solution and hit kudos button.
08/19/2024 05:50 AM
08/19/2024 10:46 PM
Done all of the steps multiple times with no help unfortunately.
I created a ticket based on what @NM said and we are now waiting for the ticket to be handled. Hopefully this will sort it out.
08/19/2024 10:47 PM
First time jar invoke needs restart so saviynt restart will help
08/20/2024 04:23 AM
So after the restart the code is still not executing. I will add screenshots to better get an idea where I am at.
I even used the zipExtractor found at the bottom of this forum post: https://forums.saviynt.com/t5/identity-governance/how-to-send-csv-file-instead-of-zip-using-sftp-con...
Would really appreciate more help on this.
08/20/2024 05:58 AM
execute method needs parameters; did you send the same as arguments?
08/20/2024 06:00 AM
@Roro method expects arguments .. you need to pass arguments in the job.
08/20/2024 06:14 AM
Alright just to get me started here what would it be in this case? Also what is the reason for the logs to be giving me an error of class not found if the issue would be that I am not providing arguments. I did already add an empty json (says to add the arguments in json) to at least verify that the class is found.
Is there really no good documentation on how this can be done so everyone trying to create a custom jar would not have to post into the forum and ask the same questions?
08/20/2024 06:18 AM
08/20/2024 06:22 AM
Here is the code (exact copy the one in the other post) just want to get something running then I could actually code my own stuff in. Btw now that I am asking can I just have a main method that would not expect any arguments? I have tried that also but still nothing is running.
08/20/2024 06:26 AM
08/21/2024 03:45 AM
I have now tested with a simple hello world jar and I still have issues with getting anything to run
Could I please get an example jar that should work and also the code that is in it. Also what the package, method and arguments I should add into our job to verify that the issue is on my side and not the code or something else.
I appreciate the help a lot!
08/21/2024 03:47 AM
Forgot to add that this is the full error for test case 3
08/21/2024 05:58 AM
Note : please attach images in inline nettime; its hard to check each image manually
Please share below
08/23/2024 12:24 AM
So I got this working by using Invoke Extension JAR Job (ExternalJarJob) **DEPRECATED** Use CustomExtensionsJob instead which makes no sense to me but I guess this is just Saviynt being Saviynt (get used to it).
For anyone else having similar issues as I did the solution is (for now)
I will paste the java code bellow for anyone interested. FYI the system out prints don't work on Saviynt only used for local testing.
08/23/2024 02:33 AM
@Roro thanks for confirmation .
Am not able find, CustomExtensionsJob and in job need to pass any arguments ? provide the screenshot for job variable reference. ?
you mean sysout it wont work and display , need to use log4j for printing values?
08/23/2024 11:09 AM
Hey so the CustomExtensionsJob is found at least for us when searching for JAR when creating a new job picture bellow:
And what it is asking is the same things as the Invoke Extension JAR Job (ExternalJarJob) picture bellow:
For the logs I know they don't work in Saviynt, I was just lazy and did not remove them after I did some testing locally.
08/25/2024 06:14 AM
Hi @Roro , you are executing directly extractcsv method right from invoke job?
08/25/2024 10:47 PM
Hi @Roro , where are you storing the extracted csv file under data files section?
08/21/2024 04:40 AM
@Roro did you do restart after each and every jar upload?
08/25/2024 11:26 PM
@NM I would like to point out I got this problem solved I just wanted someone from Saviynt to come and comment on why a deprecated job works but the one that should does not. Thanks for the advice!
08/29/2024 01:26 AM
CustomExtensionsJob is currently not released and will be available in future. from 24.5.x onwards this has been removed from the Job.
For time being, you can continue using Invoke Extension JAR Job (ExternalJarJob) which is will work to invoke JARs and the update on CustomExtensionsJob will be announced in the upcoming release notes.
Thanks