Hi,

I'm creating and trying cacel scheduler task:

Scheduler scheduler1 = (Scheduler) ic.lookup("wps/scheduler1");

TaskHandlerHome thh =

(TaskHandlerHome) PortableRemoteObject.narrow(

ic.lookup("ejb/SchedulerTaskHandlerHome"),TaskHandlerHome.class);

....

BeanTaskInfo taskInfo =

(BeanTaskInfo) scheduler1.createTaskInfo(BeanTaskInfo.class);

taskInfo.setTaskHandler(thh);

taskInfo.setName("ooo");

taskInfo.setStartTime(cal.getTime());

taskInfo.setNumberOfRepeats(numberOfRepeats);

taskInfo.setRepeatInterval(repeatInterval);

TaskStatus status = scheduler1.create(taskInfo);

//then cancel

String taskId = status.getTaskId();

scheduler1.cancel(taskId, true);



Here exception arise -



com.ibm.websphere.scheduler.SchedulerRuntimeExcept ion: Unexpected Problem
during cancel
at com.ibm.ws.scheduler.SchedulerImpl.cancel(Schedule rImpl.java:768)

.....

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -27
at java.lang.String.substring(String.java(Compiled Code))
at com.ibm.ejs.csi.J2EENameImpl.resetFromByteArray(J2 EENameImpl.java:122)
at com.ibm.ejs.csi.J2EENameImpl.readObject(J2EENameIm pl.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java(Co
mpiled Code))
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java(Co
mpiled Code))
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl
..java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compil ed Code))

....

Anybody can help me? Thanks for any ideas.