Spring reading notes----Quartz Trigger Jobstore Error Resolution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.