-
Jul 30th, 2010, 12:06 PM
#1
Stopping a job using CommandLineJobRunner
I have a job that I ran using the CommandLineJobRunner that is in an infinite loop. I tried to use the CommandLineJobRunner to stop the job as follows:
set CP=...
java -cp %CP% org.springframework.batch.core.launch.support.Comm andLineJobRunner -stop path\to\job-config.xml jobName "param1=val1" "param2=val2"
When I run this, I get the following error:
...
INFO: No database type set, using meta data indicating: SQLSERVER
Jul 30, 2010 11:28:55 AM org.springframework.batch.core.launch.support.Simp leJobLauncher afterPropertiesSet
INFO: No TaskExecutor has been set, defaulting to synchronous executor.
Jul 30, 2010 11:28:55 AM org.springframework.batch.core.launch.support.Comm andLineJobRunner start
SEVERE: Job Terminated in error: No such field java.util.Stack.null : No such field java.util.Stack.null
---- Debugging information ----
message : No such field java.util.Stack.null
cause-exception : com.thoughtworks.xstream.converters.reflection.Obj ectAccessException
cause-message : No such field java.util.Stack.null
class : java.util.HashMap
required-type : java.util.Stack
path : /map/entry/java.util.Stack/vector/default/null
line number : -1
-------------------------------
com.thoughtworks.xstream.converters.ConversionExce ption: No such field java.util.Stack.null : No such field java.util.Stack.null
---- Debugging information ----
message : No such field java.util.Stack.null
cause-exception : com.thoughtworks.xstream.converters.reflection.Obj ectAccessException
cause-message : No such field java.util.Stack.null
class : java.util.HashMap
required-type : java.util.Stack
path : /map/entry/java.util.Stack/vector/default/null
line number : -1
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vert(TreeUnmarshaller.java:88)
at com.thoughtworks.xstream.core.AbstractReferenceUnm arshaller.convert(AbstractReferenceUnmarshaller.ja va:55)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:75)
at com.thoughtworks.xstream.core.TreeUnmarshaller.con vertAnother(TreeUnmarshaller.java:59)
...
Does anybody have any thoughts on what the issue is here?
Thanks.
-
Aug 1st, 2010, 07:17 AM
#2
We might need some more detail here. The partial stack trace (a full one would tell us more) indicates an issue internally in XStream, so I guess you are processing an XML file?
Another thing that isn't very clear, is what the stack trace has to do with the CommandLineJobRunner. If you describe what you do and what the result is in more laborious detail we might get a better picture.
However, if you are going to stop a job that way it has to be listening for the signal. If it is stuck in an infinite loop in third party code then the signal will probably never get there. A TaskletStep looks for a stop signal after every execution of the tasklet (i.e. after a chunk is complete if it is item-oriented). If your Tasklet execution never ends then you will have to kill it less gracefully, and try and recover with manual operations on the repository afterwards.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules