Spring的quartz在linux没有启动过,windows运行正常

问题-如题。
quartz的spring配置:


com.dotoyo.buildjob.common.quartz.SysJobUpdateService






<bean id="cronTigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail">
        <ref bean="jobDetail"/>
    </property>

    <property name="cronExpression">
        <value>0 0/3 * * * ?</value>
    </property>
</bean>

<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
        <list>
            <ref bean="cronTigger" />
        </list>
    </property>
    <property name="applicationContextSchedulerContextKey">
        <value>applicationContext</value>
    </property>
</bean>

在windows环境下是正常的,放到linux下就 它就没有启动过,不知道怎么回事,请求帮助!

3个回答

1、看了xml文件,配置的没有问题,并且在window下正常,更说明了这一点。
2、liunx下有问题,也许是权限问题,但最好看看发布的是否有问题。

您好,您这个问题是怎么解决的啊,我遇到同样的问题了,谢谢啊

:D 运维人员部署代码到linux环境的测试环境时,使用自动化部署脚本,把更新的quartz.xml文件给覆盖了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
quartz 在windows下运行正常 在linux下运行不了
求大神指教:quartz 在windows下运行正常 在linux下启动服务的时候报下面异常,弄了好久还是不知原因,烦啊,请求好心人帮助!!! rn信息: Stopping Coyote HTTP/1.1 on http-9000 rn2013-8-30 10:08:22 org.apache.tomcat.util.digester.SetPropertiesRule begin rn警告: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'debug' to '0' did not find a matching property. rn2013-8-30 10:08:22 org.apache.tomcat.util.digester.SetPropertiesRule begin rn警告: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'trusted' to 'false' did not find a matching property. rn2013-8-30 10:08:22 org.apache.catalina.core.AprLifecycleListener init rn信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_10/jre/lib/i386/client:/usr/java/jdk1.6.0_10/jre/lib/i386:/usr/java/jdk1.6.0_10/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib rn2013-8-30 10:08:22 org.apache.coyote.http11.Http11Protocol init rn信息: Initializing Coyote HTTP/1.1 on http-9000 rn2013-8-30 10:08:22 org.apache.catalina.startup.Catalina load rn信息: Initialization processed in 1140 ms rn2013-8-30 10:08:22 org.apache.catalina.core.StandardService start rn信息: Starting service Catalina rn2013-8-30 10:08:22 org.apache.catalina.core.StandardEngine start rn信息: Starting Servlet Engine: Apache Tomcat/6.0.20 rn2013-8-30 10:08:22 org.apache.catalina.loader.WebappClassLoader validateJarFile rn信息: validateJarFile(/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class rnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). rnlog4j:WARN Please initialize the log4j system properly. rnSLF4J: Class path contains multiple SLF4J bindings. rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-jdk14-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. rn2013-8-30 10:08:25 org.quartz.impl.StdSchedulerFactory instantiate rn信息: Using default implementation for ThreadExecutor rn2013-8-30 10:08:25 org.quartz.simpl.SimpleThreadPool initialize rn信息: Job execution threads will use class loader of thread: main rn2013-8-30 10:08:25 org.quartz.core.SchedulerSignalerImpl rn信息: Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl rn2013-8-30 10:08:25 org.quartz.core.QuartzScheduler rn信息: Quartz Scheduler v.1.8.6 created. rn2013-8-30 10:08:25 org.quartz.impl.jdbcjobstore.JobStoreSupport initialize rn信息: Using db table-based data access locking (synchronization). rn2013-8-30 10:08:25 org.quartz.core.QuartzScheduler shutdown rn信息: Scheduler SchedulerName_$_NON_CLUSTERED shutting down. rn2013-8-30 10:08:25 org.quartz.core.QuartzScheduler standby rn信息: Scheduler SchedulerName_$_NON_CLUSTERED paused. rn2013-8-30 10:08:25 org.quartz.core.QuartzScheduler shutdown rn信息: Scheduler SchedulerName_$_NON_CLUSTERED shutdown complete. rn服务器启动 rn2013-8-30 10:08:25 org.apache.catalina.core.StandardContext start rn严重: Error listenerStart rn2013-8-30 10:08:25 org.apache.catalina.core.StandardContext start rn严重: Context [] startup failed due to previous errors rn服务器停止 rn2013-8-30 10:08:26 org.apache.catalina.startup.HostConfig deployWAR rn信息: Deploying web application archive proxy.war rn2013-8-30 10:08:28 org.apache.catalina.startup.HostConfig deployWAR rn信息: Deploying web application archive ssh.war rn2013-8-30 10:08:28 org.apache.catalina.loader.WebappClassLoader validateJarFile rn信息: validateJarFile(/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class rnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). rnlog4j:WARN Please initialize the log4j system properly. rnSLF4J: Class path contains multiple SLF4J bindings. rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-jdk14-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: Found binding in [jar:file:/home/apache-tomcat-emp660/webapps/ssh/WEB-INF/lib/slf4j-simple-1.5.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] rnSLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. rn2013-8-30 10:08:30 org.quartz.impl.StdSchedulerFactory instantiate rn信息: Using default implementation for ThreadExecutor rn2013-8-30 10:08:30 org.quartz.simpl.SimpleThreadPool initialize rn信息: Job execution threads will use class loader of thread: main rn2013-8-30 10:08:30 org.quartz.core.SchedulerSignalerImpl rn信息: Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl rn2013-8-30 10:08:30 org.quartz.core.QuartzScheduler rn信息: Quartz Scheduler v.1.8.6 created. rn2013-8-30 10:08:30 org.quartz.impl.jdbcjobstore.JobStoreSupport initialize rn信息: Using db table-based data access locking (synchronization). rn2013-8-30 10:08:30 org.quartz.core.QuartzScheduler shutdown rn信息: Scheduler SchedulerName_$_NON_CLUSTERED shutting down. rn2013-8-30 10:08:30 org.quartz.core.QuartzScheduler standby rn信息: Scheduler SchedulerName_$_NON_CLUSTERED paused. rn2013-8-30 10:08:30 org.quartz.core.QuartzScheduler shutdown rn信息: Scheduler SchedulerName_$_NON_CLUSTERED shutdown complete. rn
spring(quartz)定时器无法运行
rnspring 配置文件rn[code=XML]rnrn rn rn rn rn rn rn rn rn rnrn rn rn rn rnrn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn[/code]rnsimpleTrigger是我要进行测试的定时器rncronTrigger才我是需要用到的定时器rnrn测试用的是10秒一次,但我在代码里打印或设置段点,但都不行,不知道为什么rncronTrigger是我所需要的定时器,设置的时间是每天深夜0点,不知道这样设置对吗rnrn还有jobDataAsMap的这个设置,是否能自动的注入到TimerExpired类里面的articleManagerService属性中?rnrnrn[code=Java]rnpublic class TimerExpired extends QuartzJobBean rnrn protected final Log log = LogFactory.getLog(getClass());rn rn private ArticleManagerService articleManagerService;rn rn public ArticleManagerService getArticleManagerService() rn return articleManagerService;rn rnrn public void setArticleManagerService(ArticleManagerService articleManagerService) rn this.articleManagerService = articleManagerService;rn rnrn protected void executeInternal(JobExecutionContext context) throws JobExecutionException rn rn try rn articleManagerService.articleDateSet();rn log.info("TimerExpired begin");rn catch (SFTException e) rn e.printStackTrace();rn log.error(e.getMessage());rn rn rn rnrn[/code]
Spring的定时调度--Quartz配置运行
系统中通常有些需要自动执行的任务,这些任务可能每隔一段时间就要执行一次,也可能需要在指定的时间点自动执行,这些任务的自定执行必须使用任务的自动调度。 JDK为简单的任务调度提供了Timer支持,单对于更复杂的调度,例如:需要在某的时刻调度任务时,Timer就显得力不从心了。Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以...
qtftp官方没有动过
因为都不想找资源,懒人你也需要付出点代价塞,1分也不多
tomcat启动过几分钟后报错
[img=https://img-bbs.csdn.net/upload/201405/15/1400146822_752191.jpg][/img]rn刚开始的时候,Tomcat启动了几分钟后,就报这个错误,后来网上查了一下,说是跟8009端口有关系,后来看了下端口信息,果然是被占用了,然后把占用的服务关了,重新启动Tomcat,等了20分钟没有报错还以为解决了,可是睡个觉起来又看见Tomcat报这个错了。而且程序一直不稳定,有时能连上服务器,有时无法访问。弄了一些时间了,实在搞不定,大家帮帮忙啊。。
怎么得到启动过的服务器对象
我有一个TISS程序有Main函数,如下. 在main里面启动了一个服务器. rnrnTISS --appmode 就启动了服务器了server.rnrn我要实现在另外一个窗口调用TISS --command testdata, 想给这个服务器发命令testdata.rnrn问题在于main()在TISS --command testdata被调用的时候, 得不到TISS --appmode里面的服务器对象server. 我怎么才能得到TISS --appmode被调用时服务器对象server呢? rnrn请大家指教帮忙!!rnrnstatic void Main(string[] args)rnrn switch (args[0])rn rn case "--appmode":rn if (server == null) server = new Server();rn server.run();rn break;rnrn case "--stopapp":rn if (server == null) server = new Server();rn server.exit(0);rn case "--command":rn if (server == null) server = new Server();rn server.send(args[1]);rn break;rn rnrn rn default:rn Console.WriteLine("error command.");rn break; rn rn
谁用U盘启动过计算机?
我的爱国者迷你型,已经格式化为启动盘,可是在多台计算机上,无论bios怎样设置,就是不能启动计算机,问题会出在哪里呢!
Android核心剖析之Framework的启动过
Android核心剖析之Framework的启动过
如何判断一个程序已经启动过
请问如何判断一个程序已经启动过,我有一个程序启动后在任务管理器的进程名是javaw,因为经常忘记打开这个程序,所以想做个程序专门检查这个进程是否启动,谢谢
spring quartz
spring quartz
Spring + quartz
NULL 博文链接:https://wangzhen20021398.iteye.com/blog/724231
quartz spring
quartz spring的一个例子 spring和quartz进行整合
quartz与spring
quartz与spring集群, quartz与spring,quartz与spring
Spring quartz
Spring quartz
Spring Quartz
NULL 博文链接:https://baibashige.iteye.com/blog/1098332
spring quartz
spring quartz 设置定时,可以设置在规定时间内执行任务调度。
spring quartz配置问题,就是没有任何反应
在网上搜索了一大堆,spring+quartz配置了一上午,就是没有任何反应,连个错误都不报,都快欲哭无泪了!rn麻烦大虾帮小弟看看rnapplicationContext.xml配置-------------------------------------------------rnrn rn rn test.RandomPriceJobrn rn rn rn rn rn rn rn rn rn 0 * 13 * * ?rn rn rnrn rn rn rn rn rn rn rn rnjava代码---------------------------------------------------------------------rnpackage test;rnrnimport org.quartz.JobExecutionContext;rnimport org.quartz.JobExecutionException;rnimport org.springframework.scheduling.quartz.QuartzJobBean;rnrnpublic class RandomPriceJob extends QuartzJobBeanrnrn public RandomPriceJob() rn // TODO Auto-generated constructor stubrn rnrn @Overridern protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException rn System.out.println("aaaaaaaaaaa");rn rn public void doIt()rn System.out.println("aaaaaaaaaaa");rn rn public static void main(String[] args)rn System.out.println("ccccccccc");rn rnrn先谢谢大家!rn
spring和quartz的集成(java线程的方式运行)
这个是spring 和 quartz的集成,quartz是单独的包,java线程的方式运行,利用自定义Jobfactory来解决spring注入service空指针的问题,简单实例执行main方法即可,很实用
spring quartz 定时器不运行的问题
RT 操作是想rn运行的时候设置两个定时器,rn比如rn开始:2012-05-23 09:56:00 rn结束:2012-05-23 18:53:00rnrn当开始时间到了的时候在去开启两个日常定时器rn开始:08:00rn结束:19:00rnrn现在是为什么 开始:2012-05-23 09:56:00 rn时间到了的时候没有去开启两个日常定时器rn我贴一下代码rnrn[code=Java]rn/* rn * Copyright 2005 - 2009 Terracotta, Inc. rn * rn * Licensed under the Apache License, Version 2.0 (the "License"); you may not rn * use this file except in compliance with the License. You may obtain a copy rn * of the License at rn * rn * http://www.apache.org/licenses/LICENSE-2.0 rn * rn * Unless required by applicable law or agreed to in writing, software rn * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT rn * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the rn * License for the specific language governing permissions and limitations rn * under the License.rn * rn */rnrnpackage com.sanss.job;rnrnimport java.text.SimpleDateFormat;rnimport java.util.Date;rnrnimport org.quartz.CronTrigger;rnimport org.quartz.JobDetail;rnimport org.quartz.Scheduler;rnimport org.springframework.context.ApplicationContext;rnimport org.springframework.context.support.ClassPathXmlApplicationContext;rnrnpublic class MisfireExample rnrn public static final String SERVICE_ID = "SERVICEID";rnrn public ApplicationContext app;rn public Scheduler sched;rnrn public void start(Service service) throws Exception rnrn String serviceName = service.getServiceName();rn Integer serviceId = service.getServiceId();rnrn JobDetail job = new JobDetail(serviceName + "&start", serviceName,rn MyQuartzJobBean.class);rn job.getJobDataMap().put(MisfireExample.SERVICE_ID, serviceId);rnrn String startTime = service.getServiceStartDate() + " "rn + service.getSmsStartTime() + ":00"; // 开始时间rn startTime = "2012-05-23 09:56:00";rnrn CronTrigger ct = new CronTrigger(serviceName + "&start", serviceName,rn getCronExpression(startTime));rn System.out.println(ct.isVolatile());rn sched.pauseTrigger(serviceName + "&start", serviceName);// 停止触发器rn sched.unscheduleJob(serviceName + "&start", serviceName);// 移除触发器rnrn sched.scheduleJob(job, ct); // 开始任务rn sched.start();rn rn rnrn public void end(Service service) throws Exception rn String serviceName = service.getServiceName();rn Integer serviceId = service.getServiceId();rn JobDetail job = new JobDetail(serviceName + "&end", serviceName,rn MyQuartzJobBean.class);rn job.getJobDataMap().put(MisfireExample.SERVICE_ID, serviceId);rn String endTime = service.getServiceEndDate() + " "rn + service.getSmsEndTime() + ":00";// 结束时间rn endTime = "2012-05-23 18:53:00"; rn rn CronTrigger ct = new CronTrigger(serviceName + "&end", serviceName,rn getCronExpression(endTime));rn System.out.println(ct.isVolatile());rn sched.pauseTrigger(serviceName + "&end", serviceName);// 停止触发器rn sched.unscheduleJob(serviceName + "&end", serviceName);// 移除触发器rn sched.scheduleJob(job, ct); // 开始任务rn sched.start();rn // sched.shutdown(true);rn rnrn public static void main(String[] args) rn try rn MisfireExample example = new MisfireExample();rn example.app = new ClassPathXmlApplicationContext(rn "classpath:applicationContext.xml");rn example.sched = (Scheduler) example.app.getBean("quartzScheduler");rn ServiceDAO serviceDAO = (ServiceDAO) example.apprn .getBean("serviceDAO");rn Service service = serviceDAO.findById(8665);rn example.start(service);rn example.end(service);rn catch (Exception e) rn e.printStackTrace();rn rn rnrn public static String getCronExpression(String time) throws Exception rn System.out.println(time);rn SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");rn Date startDate = sdf.parse(time);rn int seconds = startDate.getSeconds(); // 秒rn int minutes = startDate.getMinutes();// 分rn int hours = startDate.getHours();// 时rn int date = startDate.getDate();// 天rn int month = startDate.getMonth() + 1;// 月rn System.out.println(hours);rn return (seconds + " " + minutes + " " + hours + " " + date + " "rn + month + " ?");rn rnrnrnrn[/code]rnrnrnrnrnrn如果要源码 可以问我拿 ,请帮忙看下是什么问题
Spring自动装配(autowire)导致quartz不能运行
在spring中配置了一个简单的quartz任务,结果报错: Failure obtaining db row lock: 第 1 行: 只有 DECLARE CURSOR 才允许使用 FOR UPDATE 子句。 只有 DECLARE CURSOR 才允许使用 FOR UPDATE 子句 at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagno...
初始quartz(spring和quartz整合)
初识quartz quartz是完全由java开发的一个开源的任务日程管理系统,“任务进度管理器”就是一个在预先确定(被纳入日程)的时间到达时,负责执行(或者通知)其他软件组件的系统。 quartz有两种存储方式: RAM存储和JDBC存储,显然ram存储就是存的缓存里面,而JDBC存储就是存到数据库中。 JDBC插入表顺序 主要的JDBC操作类,执行sql顺序。 Simple_trigger :...
spring quartz不自动运行的问题
配置如下: rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn exeTeleVarieties rn rn rnrnrn rn rn rn rn rn rn 10,15,20,25,30,35,40,45,50,55 * * * * ? rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnweb服务启动后,spring quartz并不自动运行,是怎么回事? rn总要我在代码中执行显式的向spring请求SchedulerFactoryBean对象后, rn才开始有自动运行. rn rn请问怎么让它在服务器启动后马上就运行起来?感觉好象是我没配置好,请问还要配置什么位置? rn
关于spring集成quartz的问题,运行错误提示!!!!!!!
[color=#FF0000]严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFactoryBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Unexpected runtime exception: Job class must implement the Job interface. [See nested exception: java.lang.IllegalArgumentException: Job class must implement the Job interface.]rnCaused by: org.quartz.JobPersistenceException: Unexpected runtime exception: Job class must implement the Job interface. [See nested exception: java.lang.IllegalArgumentException: Job class must implement the Job interface.][/color] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3681)rn rnrn配置文件为:rnrnrnrnrnrn rn rn rn com.test.quartz.TestJobrn rn rn rn rn 5rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn * 4,5,6,7 15 * * ?rn rn rnrn rn rn rn rn rn rn rn rn rn rn org.quartz.simpl.SimpleThreadPoolrn rn 10rn rn org.quartz.simpl.SimpleThreadPoolrn rn rn 5rn rn rn truern rn 10rn rn org.quartz.impl.jdbcjobstore.JobStoreTXrn QRTZ_rn org.quartz.impl.jdbcjobstore.StdJDBCDelegatern qzDSrn rn com.mysql.jdbc.Driverrn jdbc:mysql://localhost:3306/qrtzrn rootrn rootrn 30rnrn rn rnrnrnrn rnrnrnrn哪位大哥能帮助下小弟,这几天一直都被任务的持久化困惑着!!!!
spring quartz停止正在运行的job
job类rn[code=Java]rnimport org.apache.log4j.Logger;rnimport org.quartz.InterruptableJob;rnimport org.quartz.JobExecutionContext;rnimport org.quartz.JobExecutionException;rnimport org.quartz.UnableToInterruptJobException;rnimport org.springframework.web.servlet.mvc.multiaction.MultiActionController;rnrnimport com.figure.framework.helper.DateHelper;rnrn/**rn * Company : Figure Information Technology Co. Ltd.rn * 说明:管理队列Servletrn * @author mingdaYaorn * @create Aug 26, 2010 9:51:05 AMrn */rnpublic class SmsSequenceManagerServlet3 extends MultiActionController implements InterruptableJobrn rn private static final Logger logger = Logger.getLogger(SmsSequenceManagerServlet3.class);rn private final String senderSmsTime = "senderSmsThreadRun";rn @Overridern public void interrupt() throws UnableToInterruptJobException rn logger.error("stopstopstopstopstop......!"); rn rnrn public void execute(JobExecutionContext arg0) throws JobExecutionException rn this.getServletContext().setAttribute(senderSmsTime, DateHelper.getNowStr());rn logger.error("doTime4 masServlet准备初始化......!"); rn rn// SmsSequenceManagerServlet3.this.masServlet.init();//初始化MASrn logger.error("doTime4 masServlet初始化成功......!"); rn rn // 测试用例rn int i = 0;rn while(true)rn this.getServletContext().setAttribute(senderSmsTime, DateHelper.getNowStr());rn try rn Thread.sleep(2000);rn logger.error("send......!" + i++); rn catch (InterruptedException e) rn e.printStackTrace();rn rn rn rnrnrn[/code]rnrn[code=XML]rn rn rn rn rn rn rn rn executern rn rn rnrn rnrn rn rn rn rn 0 rn $sendSmsInterval rn rnrnrn rn rn rn rn rn rn rn rnrnrn[/code]rnrnrnrn报如下异常rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobtask4' defined in ServletContext resource [/WEB-INF/classes/spring/threadContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodException: com.figure.monitor.servlet.SmsSequenceManagerServlet3.execute()rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1403)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:545)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: java.lang.NoSuchMethodException: com.figure.monitor.servlet.SmsSequenceManagerServlet3.execute()rn at java.lang.Class.getMethod(Class.java:1605)rn at org.springframework.util.MethodInvoker.prepare(MethodInvoker.java:178)rn at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean.afterPropertiesSet(MethodInvokingJobDetailFactoryBean.java:168)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)rn ... 36 morernrnrnJOB类实现接口的目的在于业务中有需要停止正在运行的JOB的逻辑rnrn[code=Java]rn private void reboot() throws SchedulerException,InterruptedException,Exceptionrn rn ServletContext application = getServletContext(); rn rn // 读取SPRING 容器rn ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(application);rn rn // 读取容器中的QUARTZ总管类rn org.quartz.Scheduler scheduler = (org.quartz.impl.StdScheduler)ctx.getBean("startQuertz");rn rn // 停止正在运行的JOBrn scheduler.interrupt("jobtask4", Scheduler.DEFAULT_GROUP);rn .....rn .....rn // 重启任务rn scheduler.resumeTrigger("doTime4", Scheduler.DEFAULT_GROUP);rnrnrn[/code]rn
在windows下运行正常。在linux下报错。。
Warning: -jar not understood. Ignoring.rnException in thread "main" java.lang.NoClassDefFoundError: chatPro.jarrn at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)rn at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)rn at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)rn at __gcj_personality_v0 (/mnt/hgfs/011/chatPro/java.version=1.4.2)rn at __libc_start_main (/lib/tls/libc-2.3.4.so)rn at _Jv_RegisterClasses (/mnt/hgfs/011/chatPro/java.version=1.4.2)rn[root@localhost chatPro]# java -cp chatPro.jarrnUsage: gij [OPTION] ... CLASS [ARGS] ...rn to invoke CLASS.main, orrn gij -jar [OPTION] ... JARFILE [ARGS] ...rn to execute a jar filernTry `gij --help' for more information.
Windows线程启动到消亡的运行状态
线程在被创建出来后会经历,启动->运行->挂起->休眠->消亡几个状态。启动和消亡在以前的帖子里都已经讲烂了,在这里主要说下运行,挂起,还有休眠的状态。 运行:CPU的抢栈式的运行方式,导致了线程在运行过程中会来回切换。这样就会不停的读取CONTEXT,大致流程是:保存CONTEXT->切换线程执行->切换回来->读取CONTEXT。注意了,这里用了个词叫切换,其实不然,运行过程中线程也
java 在linux和windows下运行
为什么java程序在windows下运行,只用了30m的内存,但在linux下却用了400m的内存,问题可能出在哪里呢?
windows正常linux(Ubuntu16)乱码问题
解决方案: 1、修改linux系统编码 sudo vi /etc/default/locale LANG=en_US.UTF-8 LANGUAGE=&quot;en_US:UTF-8&quot; LC_ALL=&quot;en_US.UTF-8&quot;   2、spring boot 项目application.properties 文件添加 server.tomcat.uri-encoding=UTF-8 sprin...
windows下正常的可执行jar在linux 下运行出错,帮忙看下
我在WINDOWS下弄的一个.jar可执行程序,在windows下是可以正常运行的。但是到linux下就不能运行了,出现如下错误,不知道是什么问题导致的?rnrnWarning: -jar not understood. Ignoring.rnException in thread "main" java.lang.NoClassDefFoundError: ScanFolder.jarrn at gnu.gcj.runtime.FirstThread.run() (/usr/lib64/libgcj.so.5.0.0)rn at _Jv_ThreadRun(java.lang.Thread) (/usr/lib64/libgcj.so.5.0.0)rn at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib64/libgcj.so.5.0.0)rn at __gcj_personality_v0 (/sbslog/scaner/java.version=1.4.2)rn at __libc_start_main (/lib64/tls/libc-2.3.4.so)rn at _Jv_RegisterClasses (/sbslog/scaner/java.version=1.4.2)
windows上正常,linux上运行segmentation fault
实验室有fortran程序,在windows上编译运行都没有问题,rn但是当提到集群上编译没问题,运行的时候就出问题,报的是segmentation faultrnrnforrtl: severe (174): SIGSEGV, segmentation fault occurredrnImage PC Routine Line Source rnmd 0000000000415A70 Unknown Unknown Unknownrnmd 000000000041C7E3 Unknown Unknown Unknownrnmd 0000000000415EA6 Unknown Unknown Unknownrnmd 00000000004033BC Unknown Unknown Unknownrnlibc.so.6 000000372CC1ECDD Unknown Unknown Unknownrnmd 00000000004032B9 Unknown Unknown Unknown
Linux 下部署项目 失败,windows下可以正常部署运行的
[code=text]rnJun 04, 2013 7:07:34 AM org.apache.catalina.core.AprLifecycleListener initrnINFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/librnJun 04, 2013 7:07:34 AM org.apache.coyote.AbstractProtocol initrnINFO: Initializing ProtocolHandler ["http-bio-8080"]rnJun 04, 2013 7:07:34 AM org.apache.coyote.AbstractProtocol initrnINFO: Initializing ProtocolHandler ["ajp-bio-8009"]rnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.Catalina loadrnINFO: Initialization processed in 294 msrnJun 04, 2013 7:07:34 AM org.apache.catalina.core.StandardService startInternalrnINFO: Starting service CatalinarnJun 04, 2013 7:07:34 AM org.apache.catalina.core.StandardEngine startInternalrnINFO: Starting Servlet Engine: Apache Tomcat/7.0.40rnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnINFO: Deploying web application directory /usr/apache-tomcat-7.0.40/webapps/ROOTrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnSEVERE: Error deploying web application directory /usr/apache-tomcat-7.0.40/webapps/ROOTrnjava.lang.NullPointerExceptionrn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:722)rnrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnINFO: Deploying web application directory /usr/apache-tomcat-7.0.40/webapps/managerrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoriesrnSEVERE: Error waiting for multi-thread deployment of directories to completehostConfig.deployWar=Deploying web application archive 0rnjava.util.concurrent.ExecutionException: java.lang.NullPointerExceptionrn at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)rn at java.util.concurrent.FutureTask.get(FutureTask.java:111)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1037)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:479)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1402)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)rn at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)rn at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)rn at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:722)rnCaused by: java.lang.NullPointerExceptionrn at org.apache.catalina.startup.HostConfig.addWatchedResources(HostConfig.java:1172)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn ... 5 morernrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnINFO: Deploying web application directory /usr/apache-tomcat-7.0.40/webapps/docsrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnINFO: Deploying web application directory /usr/apache-tomcat-7.0.40/webapps/examplesrnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.HostConfig deployDirectoryrnINFO: Deploying web application directory /usr/apache-tomcat-7.0.40/webapps/host-managerrnJun 04, 2013 7:07:34 AM org.apache.coyote.AbstractProtocol startrnINFO: Starting ProtocolHandler ["http-bio-8080"]rnJun 04, 2013 7:07:34 AM org.apache.coyote.AbstractProtocol startrnINFO: Starting ProtocolHandler ["ajp-bio-8009"]rnJun 04, 2013 7:07:34 AM org.apache.catalina.startup.Catalina startrnrn[/code]
spring 启多线程执行程序
import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.contex
一个进程启动过多的线程会不会有问题?
比如启动10,或者20个。rnrn再问一下,在一个线程里用Sleep,如果CPU的时间片轮到这个线程时,这个线程正在sleep,该线程会不会立即交出执行权?
Quartz 2.0的.net3.5下,作为windows 服务运行,以及控制台运行
http://www.cnblogs.com/lzrabbit/archive/2012/04/15/2448326.html 这个实例安服务安装不上啊,让我改造了一下 这会能用了,很正常. 欢迎访问blog: blog.turingmall.com
Spring + quartz + MySQL,web项目重启以后,quartz自启成功但是并不恢复任务,怎么办?
我的是web项目,用的Spring 3.0.5.RELEASE + quartz 1.8.6,现在已经可以将数据存储到MySQL中持久化,但是重启web项目以后quartz可以自启动成功,可是不能恢复存储到MySQL中的任务。rn由于我的quartz任务需要页面手动创建,所以Spring的配置文件只有一行:rn[code=text]rn rn rn[/code]rn我也试过,不过没用,一样是quartz启动,但是不恢复任务。rnrnquartz.properties使用的JobStoreTX,在不使用Spring注入,直接使用web.xml配置org.quartz.ee.servlet.QuartzInitializerServlet时测试没有问题,重启工程也可以正确恢复任务,我没有额外的改动,文件如下:rn[code=text]org.quartz.scheduler.instanceName = DefaultQuartzSchedulerrnorg.quartz.scheduler.rmi.export = falsernorg.quartz.scheduler.rmi.proxy = falsernorg.quartz.scheduler.wrapJobExecutionInUserTransaction = falsernrnorg.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPoolrnorg.quartz.threadPool.threadCount = 10rnorg.quartz.threadPool.threadPriority = 5rnorg.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = truernrnorg.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTXrnorg.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate rnorg.quartz.jobStore.useProperties = falsernorg.quartz.jobStore.tablePrefix = QRTZ_ rnorg.quartz.jobStore.isClustered = false rn# Configure Datasources rn#============================================================================ rnorg.quartz.jobStore.dataSource = myDSrnorg.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver rnorg.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/quartz1x?useUnicode=true&characterEncoding=utf8 rnorg.quartz.dataSource.myDS.user = root rnorg.quartz.dataSource.myDS.password =111111rnorg.quartz.dataSource.myDS.maxConnections = 10 rn[/code]rn
Android 通过广播调用未启动过的App
Android 3.1后,增加了两个Intent的flag: FLAG_EXCLUDE_STOPPED_PACKAGES=0x10  不含停止的app  FLAG_INCLUDE_STOPPED_PACKAGES=0x20   含停止的app 对于安装了,但是从来没有启动过的app,系统默认添加的flag为:FLAG_EXCLUDE_STOPPED_PACKAGES 反之,则是
quartz介绍以及quartz在spring中的应用
quartz自带的接口 Scheduler, Trigger, Job, JobDetail 在spring中,一般通过FactoryBean的方式生成特定的quartz对象 SchedulerFactoryBean, CronTriggerFactoryBean,SimpleTriggerFactoryBean, QuartzJobBean, MethodInvokingJobDeta...
Quartz 的基本使用 及 Spring与Quartz 的整合配置
Quartz 使用 Quartz 核心:调度器Scheduler,任务JobDetail,触发器Trigger 调度器 Scheduler Scheduler 接口为任务的调度者,相当于一个总指挥,由工厂模式(SchedulerFactory接口)创建, SchedulerFactory接口有2个实现类:StdSchedulerFactory 和 DirectSchedulerFa...
任务调度quartz(一)quartz在spring中的集成
对于定时器想必大家都应该挺清楚,就像闹钟一样,在某个指定的时间点定时执行。在Java中我们可以使用quartz来定时调度自己的任务,这个框架为我们提供很多比较方便的功能,能够很轻易对我们的任务进行启动、暂停以及运行周期的修改。 任务调度的意义还是挺大的,例如我们可以写一个调度平台来管理和监控自己写的任务,而在这些任务中我们可以写自己想要干的事,比如做个生日提醒啊,只要发现当前是谁的生日,就给自己发
动态Quartz任务调度(Spring结合Quartz)
之前写过一遍配置quartz任务调度的博文,链接:点击打开链接,这种方式不够灵活,所以今天特地用java代码实现动态Quartz任务调度。闲话不多说了,直接上代码。 package org.demo.schedule; import java.text.ParseException; import org.demo.core.context.SpringContextUtil; import
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池