Hi All
I Deployed the application in JBOSS and Batch is throwing a Exception .
The Same Application is running fine In Tomcat6.x
I am using customized CommandLineRunner the start method gets invoked from a Spring Controller Class
4010Jobreader is placed in the Src folder of the application : so i guess it should not be a classpath problem
MyCommandLine Snippet
Code:log.info("Start of startJob"); log.info("[MyCommandLine]-startJob Free Memory is ::" + Runtime.getRuntime().freeMemory()); currentDate = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss "); // currentDate. //ClassPathXmlApplicationContext context = null; ConfigurableApplicationContext context = null; try { context = new ClassPathXmlApplicationContext("4010Jobreader.xml"); context.getAutowireCapableBeanFactory().autowireBeanProperties( this, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, false); Job job; if (jobLocator != null) { job = jobLocator.getJob(jobName); } else { job = (Job) context.getBean(jobName); } // Start FTP download try { ftpDownloadProcess.startFtpSftp(Integer.parseInt(NIdNbr)); } catch (Exception ex) { log.error("Exception due to" + ex.getMessage()); ex.printStackTrace(); }
Please have a look 2 the stack trace :
Code:12:48:02,058 INFO [ClassPathXmlApplicationContext] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@11ff5d1: startup date [Wed Jul 20 12:48:02 IST 2011]; root of context hierarchy 12:48:02,058 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [4010Jobreader.xml] 12:48:02,058 ERROR [STDERR] org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [4010Jobreader.xml]; nested exception is java.io.FileNotFoundException: class path resource [4010Jobreader.xml] cannot be opened because it does not exist 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) 12:48:02,058 ERROR [STDERR] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) 12:48:02,058 ERROR [STDERR] at com.abcbs.EDI837.common.MyCommandLine.startJob(MyCommandLine.java:337) 12:48:02,058 ERROR [STDERR] at com.abcbs.EDI837.common.MyCommandLine.main(MyCommandLine.java:975) 12:48:02,058 ERROR [STDERR] at com.abcbs.EDI837.common.QuartzSample.execute(QuartzSample.java:25) 12:48:02,058 ERROR [STDERR] at org.quartz.core.JobRunShell.run(JobRunShell.java:203) 12:48:02,058 ERROR [STDERR] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 12:48:02,058 ERROR [STDERR] Caused by: java.io.FileNotFoundException: class path resource [4010Jobreader.xml] cannot be opened because it does not exist 12:48:02,058 ERROR [STDERR] at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141) 12:48:02,058 ERROR [STDERR] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) 12:48:02,058 ERROR [STDERR] ... 17 more
Can some one please guide me to solve the problem![]()



Reply With Quote