Hi all,<br><br>I´m trying to schedule an OpenCms job, and wrote a class that implements I_CmsScheduledJob. However, I´m getting an error that says "org.opencms.scheduler.CmsSchedulerException: Could not schedule job
"PAnalysis" for class
"br.portalconhecimento.scheduling.PJob". <br><br>The .class file for the Job class are located at my module "classes" folder, and I can construct an object from it (which means that it is in the classpath). I also tried to package it to a jar and put it on the Tomcat "lib" folder, but no success.
<br><br>I checked the list, and a message from 2006 states the same error, but with no answers. I think that is a dumb error, but the question remains: there is something else I must do? The steps I followed where:<br><br>
1 - Make a class that implements I_CmsScheduledJob;<br>2 - Package it in a jar and put this jar on the "common/lib" Tomcat folder;<br>3 - Restart Tomcat;<br><br>After this steps, I got the error above (and the class does not appear at the "Scheduled Jobs" Administration panel combo). The code that does the scheduling is as follows:
<br><br>CmsScheduledJobInfo csji = new CmsScheduledJobInfo();<br> CmsScheduleManager csm = new CmsScheduleManager();<br> csm.initialize(cmsObject);<br><br> CmsContextInfo cci = new CmsContextInfo(cmsJspBean.getRequestContext
());<br><br> csji.setCronExpression(getCronExpression());<br> csji.setClassName("br.portalconhecimento.scheduling.PJob");<br><br> csji.setActive(true);<br> csji.setContextInfo(cci);<br>
csji<br> .setJobName(new StringBuilder("PAnalysis[").append(<br> cmsUser.getId()).append("][").append(cmsVfsFileURL)<br> .append("][").append(
<br> new SimpleDateFormat(DATE_FORMAT_BR)<br> .format(new Date())).toString());<br><br> SortedMap parametros = new TreeMap();<br> parametros.put
(PJob.PARAM_USER, cmsUser);<br> parametros.put(PJob.PARAM_FILE, cmsVfsFileURL);<br> parametros.put(PJob.PARAM_NOTIFY_END_OF_JOB, notifyEndOfJob);<br><br> csji.setParameters(parametros);<br><br>
csm.scheduleJob(cmsObject, csji);<br><br>Has someone a clue?<br><br>TIA,<br><br>Celio.<br>