[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Quartz + Hibernate + Spring  XML
Forum Index -> Quartz
Author Message
geni

journeyman

Joined: 09/16/2011 09:39:16
Messages: 13
Offline

So I have a spring project that is already using Hibernate and everything works just fine. I want to integrate the Quatz Scheduler and want to use my already existing database and a JobStoreTX job store class. I must be doing something wrong because I get the following exceptions:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'se_suite.qrtz_locks' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:89)
... 33 more

The message is pretty clear so can anyone tell me which tables do I need to create for quartz? Can I create them automaticaly? Can I change the structure like add new columns or such things.

Thanks
light5

ophanim
[Avatar]
Joined: 01/14/2011 20:32:56
Messages: 554
Offline

You have to create the Quartz tables manually for your database. It's not auto matic, and it's not related to Hibernate. See quartz dist zip download under docs/dbTables/*.sql for your database.

Modifying quartz table structure is not recommended. It's pretty safe to use quartz as it was design and let it manage it table data and sessions.

Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule
[WWW]
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team