i have written DBTest scheduler class and copied into scheduler-plugin.jar;but
when i run the server i am getting the below exception;
i want to run the DBTest class for evry 60 seconds..i confgured DBTest in
schedular-service.xml;
schedular-service.xml
*********************
true
org.jboss.varia.scheduler.example.DBTest
DBTest Testtttttttt,12345
java.lang.String,int
NOW
60000
-1
DBTest
***********
package org.jboss.varia.scheduler.example;
import java.util.Date;
import org.jboss.varia.scheduler.Schedulable;
import java.sql.*;
import org.apache.log4j.Logger;
public class DBTest implements Schedulable
{
private static final Logger log = Logger.getLogger(DBTest.class);
private String name;
private long value;
public DBTest(String name, long value)
{
this.name = name;
this.value = value;
log.info("ctor, name: " + name + ", value: " + value);
}
public void perform(Date now, long remainingRepetitions)
{
log.info("perform, now: " + now +
", remainingRepetitions: " + remainingRepetitions +
", name: " + name + ", value: " + value);
try
{
Class.forName("xx.xx.x.xx");
Connection con=
DriverManager.getConnection("jdbc:oracle:thin:@xxxxx:xxx:xxx","xxxx","xxx");
}catch(Exception e)
{
e.printStackTrace();
}
}
}
2006-02-09 16:28:15,301 ERROR [org.jboss.varia.scheduler.Scheduler] Could not
find the constructor or create Schedulable instance
java.lang.NoSuchMethodException:
org.jboss.varia.scheduler.example.DBTest.(java.lang.String, int)
at java.lang.Class.getConstructor0(Class.java:1937)
at java.lang.Class.getConstructor(Class.java:1027)
at org.jboss.varia.scheduler.Scheduler.startSchedule(Scheduler.java:294)
at org.jboss.varia.scheduler.Scheduler.startService(Scheduler.java:1157)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922523#3922523
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922523
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user