Hi,
I am having great difficulty in trying to run my spring batch application via the command line. It works fine when I run it within Spring Tool Suite but when I run it on the command line I get the error (see attachment for full stacktrace)
I have also create a new project called SampleBatch by importing the “Simple Spring Batch Project” template, copied this project into a folder on my C drive called C:\build\SampleBatch. navigated to this directory and run “mvn package” to create an executable jar and it runs fine with the command:Code:Failed to read schema document
However when I change to the target directory and run the followingCode:mvn exec:java -Dexec.mainClass=org.springframework.batch.core.launch.support.CommandLineJobRunner -Dexec.args="launch-context.xml job1 runid=1"
I get the following error (see the attached output.txt for the full stacktrace).Code:java -jar spring-batch-simple-2.0.0.CI-SNAPSHOT.jar launch-context.xml job1 runid=2
I have coped the contents of the manifect.mf file of the jar spring-batch-simple-2.0.0.CI-SNAPSHOT.jar and all the libraries exist in the ./lib directory.Code:org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-2.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
I have tried various suggestions I have found while researching this but to no avail.Code:Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: dwakley Build-Jdk: 1.6.0_20 Main-Class: org.springframework.batch.core.launch.support.CommandLineJ obRunner Class-Path: lib/spring-jdbc-3.0.0.RELEASE.jar lib/spring-beans-3.0.0.R ELEASE.jar lib/spring-core-3.0.0.RELEASE.jar lib/spring-asm-3.0.0.REL EASE.jar lib/commons-logging-1.1.1.jar lib/spring-tx-3.0.0.RELEASE.ja r lib/aopalliance-1.0.jar lib/spring-aop-2.5.6.jar lib/spring-context -2.5.6.jar lib/spring-batch-core-2.1.0.RELEASE.jar lib/spring-batch-i nfrastructure-2.1.0.RELEASE.jar lib/xstream-1.3.jar lib/xpp3_min-1.1. 4c.jar lib/jettison-1.1.jar lib/commons-dbcp-1.2.2.jar lib/commons-po ol-1.3.jar lib/commons-io-1.4.jar lib/hsqldb-1.8.0.7.jar lib/aspectjr t-1.6.8.jar lib/aspectjweaver-1.6.8.jar lib/log4j-1.2.14.jar lib/mysq l-connector-java-5.1.12.jar
So would appreciate with further suggestions.
Thanks in advance
Dave


Reply With Quote
