romarie321
2014-03-13 09:07:23 UTC
hello, i am having a problem here, when i put this code to my
/job/jobScheduler.groovy i used Quartz plugin to schedule some execution.
What i simply want to achieve is to retrieve some data from the database
table at some interval time, but when i try to access to mysql database, it
always throws some error of
"no suitable driver found for jdbc".. but i perfectly stated it at my
program..
The thing is when i put this code to my Controller, it perfectly works
fine.. All i want is to get rid of this "driver" thing error.
package test
import groovy.sql.Sql
class TestJob {
static triggers = {
simple name: 'mySimpleTrigger', startDelay: 1000, repeatInterval: 1000
}
def execute(){
def dataSource // the Spring-Bean "dataSource" is auto-injected
def db = new Sql(dataSource) // Create a new instance of groovy.sql.Sql
with the DB of the Grails app
def result = db.rows("SELECT Label, data, testDate from testData order by
testDate") // Perform the query
print(result);
}
}
Any help?
--
View this message in context: http://grails.1312388.n4.nabble.com/no-suitable-driver-found-for-jdbc-when-using-Job-Scheduler-Quartz-tp4655050.html
Sent from the Grails - dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
/job/jobScheduler.groovy i used Quartz plugin to schedule some execution.
What i simply want to achieve is to retrieve some data from the database
table at some interval time, but when i try to access to mysql database, it
always throws some error of
"no suitable driver found for jdbc".. but i perfectly stated it at my
program..
The thing is when i put this code to my Controller, it perfectly works
fine.. All i want is to get rid of this "driver" thing error.
package test
import groovy.sql.Sql
class TestJob {
static triggers = {
simple name: 'mySimpleTrigger', startDelay: 1000, repeatInterval: 1000
}
def execute(){
def dataSource // the Spring-Bean "dataSource" is auto-injected
def db = new Sql(dataSource) // Create a new instance of groovy.sql.Sql
with the DB of the Grails app
def result = db.rows("SELECT Label, data, testDate from testData order by
testDate") // Perform the query
print(result);
}
}
Any help?
--
View this message in context: http://grails.1312388.n4.nabble.com/no-suitable-driver-found-for-jdbc-when-using-Job-Scheduler-Quartz-tp4655050.html
Sent from the Grails - dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email