Keep the quartz jobdetail,trigger to the database and find that the system error the job (Default.jobdetail) referenced by the trigger does not exist
It has been tested that only spring's test environment is normal when not using Hibernate. And when put in the work environment, there is a mistake. So the suspicion is a datasource problem. The Spring Quartz Forum found this to be the problem. The DataSource of the quartz is resolved by separating them independently. In fact, you can not be independent of the quartz transaction also to spring together to handle also can. Jdbc.properties
jdbc.driver=com.mysql.jdbc.driverjdbc.url=jdbc:mysql://127.0.0.1:3306/quartz?useunicode=true& Characterencoding=utf-8&autoreconnect=truejdbc.username=rootjdbc.password=huaweiquartz.jdbc.driver= com.mysql.jdbc.driverquartz.jdbc.url=jdbc:mysql://127.0.0.1:3306/quartz?useunicode=true&characterencoding= Utf-8&autoreconnect=truequartz.jdbc.username=rootquartz.jdbc.password=huawei
Applicationcontext-datasource.xml
<!--transaction manager configuration, hibernate single data source transaction--><bean id= "Defaulttransactionmanager" class= " Org.springframework.orm.hibernate3.HibernateTransactionManager "><property name=" sessionfactory "ref=" Sessionfactory "/></bean><!--another transaction manager, JDBC Single data source transaction--><bean id=" Quartztransactionmanager "class=" Org.springframework.jdbc.datasource.DataSourceTransactionManager "><property name=" datasource "ref=" Quartzdatasource "/></bean>
Applicationcontext-quartz.xml
<bean name= "Quartzscheduler" class= "Org.springframework.scheduling.quartz.SchedulerFactoryBean" >< Property Name= "DataSource" ref= "Quartzdatasource"/><property name= "Applicationcontextschedulercontextkey" Value= "ApplicationContext"/><property name= "configlocation" value= "classpath:schedule/quartz.properties"/ ><property name= "Autostartup" ><value>true</value></property></bean>
Spring reading notes----Quartz Trigger Jobstore Error Resolution