Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

JAR in prod is throwing error, same JAR is fine in dev environment

Harsha
Regular Contributor II
Regular Contributor II

Hello,

We have JAR file to send the analytics report as body in a mail which is working fine in the dev but same is throwing an error like classnotfound exception.

"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.393750278Z stdout F 2023-03-24 11:07:41,393 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - START ExternalJarJob"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.437023945Z stdout F 2023-03-24 11:07:41,436 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Lets Invoke Class Nametotalcount.TotalCountEmail method main"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.439356059Z stdout F 2023-03-24 11:07:41,439 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Enter checkForAlreadyRunningJob"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.439383359Z stdout F 2023-03-24 11:07:41,439 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Trigger Name to check: MT_142uil6peaotf"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.439386759Z stdout F 2023-03-24 11:07:41,439 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - className to check: totalcount.TotalCountEmail"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.439400459Z stdout F 2023-03-24 11:07:41,439 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - methodName to check: main"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.43944656Z stdout F 2023-03-24 11:07:41,439 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Query to check running triggers:  select qt.JOB_DATA as jobData from qrtz_triggers qt inner join qrtz_fired_triggers qft"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.43945016Z stdout F                             where qt.TRIGGER_NAME = qft.TRIGGER_NAME"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.43945276Z stdout F                             and qt.TRIGGER_GROUP = qft.TRIGGER_GROUP"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.43945486Z stdout F                             and qt.JOB_NAME = qft.JOB_NAME"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.43945766Z stdout F                             and qt.JOB_GROUP = qft.JOB_GROUP and qft.JOB_NAME='ExternalJarJob' "
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.446989406Z stdout F 2023-03-24 11:07:41,446 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Testing-JobDataMap.size : 9"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.448504015Z stdout F 2023-03-24 11:07:41,448 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - runningTriggerNamesToCount: [totalcount.TotalCountEmail###main:1]"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.448517416Z stdout F 2023-03-24 11:07:41,448 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - Exit checkForAlreadyRunningJob"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.448526616Z stdout F 2023-03-24 11:07:41,448 [quartzScheduler_Worker-3] DEBUG jobs.ExternalJarJob  - proceed: true"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451670035Z stdout F 2023-03-24 11:07:41,451 [quartzScheduler_Worker-3] ERROR jobs.ExternalJarJob  - Error: "
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451679935Z stdout F java.lang.ClassNotFoundException: totalcount.TotalCountEmail"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451683235Z stdout F     at java.lang.Class.forName(Class.java:348)"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451685535Z stdout F     at ExternalJarJob.execute(ExternalJarJob.groovy:75)"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451688635Z stdout F     at org.quartz.core.JobRunShell.run(JobRunShell.java:199)"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.451691535Z stdout F     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)"
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.455123656Z stdout F 2023-03-24 11:07:41,455 [quartzScheduler_Worker-3] DEBUG services.SaviyntCommonUtilityService  - Enter runNextTrigger "
"ecm-worker","2023-03-24T11:07:42.313+00:00","2023-03-24T11:07:41.455140856Z stdout F 2023-03-24 11:07:41,455 [quartzScheduler_Worker-3] DEBUG services.SaviyntCommonUtilityService  - Exit runNextTrigger "

Eventhough its the same JAR working in dev with same class and package. Can anyone help us ASAP about why this is happening?

Thank you,

Harsha

9 REPLIES 9

prasannta
Saviynt Employee
Saviynt Employee

Was the server restarted after deploying the custom jar? The error is showing class not found exception. Can you confirm if the jar name does not contain any special character? Also if you have configured the correct classname while configuring the job in Job Control Panel?

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Thank you for the quick response, To answer your question- yes it was restarted after deploying the JAR. And JAR name doesnot have any special character. And yes classname is correct samething is working in dev. Please let me know if you have faced this issue, how you fixed it? 

Thank you,

Harsha

prasannta
Saviynt Employee
Saviynt Employee

Another reason why this could have happened is that the Jar was not uploaded in ECM properly. For this you would have to reach out to support team to check if the lib folder of ECM contains the jar that was uploaded from UI. If not, the jar upload was not successful. You can ask the support agent to delete the old jar and re-upload the new jar and do the restart of server.

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Thank you for your response, I have raised a ticket regarding this.

Thanks,

Harsha

Hemanath
Saviynt Employee
Saviynt Employee

Hi @Harsha ,

have you checked  that below added in externalconfig.properties files

fileDirectory.externalJarPath=/application_instance/custom_code/saviynt/Import/externalJar/

Thanks,

Hemanath J

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Thank you for the response, the above mentioned is not in the DEV configuration file as well and it is still working fine in DEV environment. Do you think that is causing the issue?

Harsha
Regular Contributor II
Regular Contributor II

Hello @Hemanath , 

Thank you for your response. Even after adding the above mentioned in configuration file,it is still failing the job. Please let us know how can we fix this?

Thanks,

Harsha 

 

prasannta
Saviynt Employee
Saviynt Employee

Have you restarted the servers after adding entries in the externalconfig.properties file? if still the problem persists, then please a FreshDesk Ticket to report this issue.

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Thank you for your response, we found out that its due to package name if its com.custom.XXX only then its working in PROD. And in the DEV its working irrespective of packagename.

Thanks,

Harsha