Announcement Announcement Module
Collapse
No announcement yet.
Running Quartz job through Command Line Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running Quartz job through Command Line

    I have created the Spring Batch Job through My Eclipse and Schedule through Quartz and It is working fine but when i tried to run the same quartz job through command line i am getting the error as below

    Code:
    Exception in thread "Thread-0" org.springframework.beans.factory.BeanCreationExc
    eption: Error creating bean with name 'org.springframework.scheduling.quartz.Sch
    edulerFactoryBean#0' defined in class path resource [quartz-job-launcher-context
    .xml]: Invocation of init method failed; nested exception is java.lang.NoClassDe
    fFoundError: org/apache/commons/logging/Log
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
    ject(AbstractBeanFactory.java:264)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:221)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
    an(AbstractBeanFactory.java:261)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:185)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:164)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:423)
            at org.springframework.context.support.AbstractApplicationContext.finish
    BeanFactoryInitialization(AbstractApplicationContext.java:729)
            at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:381)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<i
    nit>(ClassPathXmlApplicationContext.java:139)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<i
    nit>(ClassPathXmlApplicationContext.java:83)
            at us.tn.state.trust.batch.emissions.scheduler.QuartzBatchLauncher.run(Q
    uartzBatchLauncher.java:99)
            at us.tn.state.trust.batch.emissions.scheduler.QuartzBatchLauncher.acces
    s$000(QuartzBatchLauncher.java:32)
            at us.tn.state.trust.batch.emissions.scheduler.QuartzBatchLauncher$1.run
    (QuartzBatchLauncher.java:76)
    I have added the commons-logging-1.0.4.jar in my classpath but still i am getting the error. Please help
    Last edited by adish1234; May 11th, 2009, 01:44 PM.

  • #2
    Are you sure it's the correct classpath though? Keep in mind that the classpath quartz is running in is different from the one you are attempting to run your job in. Since I'm assuming you're using a Quartz NativeJob, which is the only way to kick off a job through the command line, then you should make sure whatever script you're using to invoke the command line job runner is correctly setting up the classpath.

    Comment

    Working...
    X