-
1. Re: Job operator is called then job exits with no log messages
cfang May 18, 2017 3:58 PM (in response to richardmoore)Do you have a reproducible test app? Can you create a JIRA issue and attach the test app, including these jars that caused the problem?
This is the similar issue you reported on Sep 26, 2016:
BatchRuntime.getJobOperator() call is prematurely terminating the program
-
2. Re: Job operator is called then job exits with no log messages
cfang May 18, 2017 10:35 PM (in response to cfang)I ran a job manually with these 4 jars in teh front of the classpath and JBeret 1.3.0.Beta6-SNAPSHOT, but didn't see your problem:
/Users/cfang/jberet/lib >
java -cp /Users/cfang/Downloads/cb2xml/JRecord_Version_0.81.4/lib/JRecord.jar:/Users/cfang/Downloads/cb2xml/JRecord_Version_0.81.4/lib/Cobol2Cobol.jar:/Users/cfang/Downloads/cb2xml/JRecord_Version_0.81.4/lib/cb2xml.jar:/Users/cfang/Downloads/cb2xml/JRecord_Version_0.81.4/lib/Cobol2Xml.jar:/Users/cfang/Downloads/cb2xml/JRecord_Version_0.81.4/lib/Xml2Cobol.jar:jboss-batch-api_1.0_spec-1.0.0.Final.jar:jberet-core-1.3.0.Beta6-SNAPSHOT.jar:jberet-se-1.3.0.Beta6-SNAPSHOT.jar:jboss-transaction-api_1.2_spec-1.0.0.Final.jar:wildfly-security-manager-1.1.2.Final.jar:jboss-logging-3.3.0.Final.jar:jboss-marshalling-1.4.10.Final.jar:jberet-vertx-shell-1.3.0.Beta6-SNAPSHOT.jar:cdi-api-1.2.jar:weld-core-2.3.4.Final.jar:weld-se-2.3.4.Final.jar:weld-spi-2.3.SP2.jar:jberet-support-1.3.0.Beta6-SNAPSHOT.jar:validation-api-1.1.0.Final.jar:/Users/cfang/jberet/lib/jackson-core-2.5.4.jar:/Users/cfang/jberet/lib/jackson-databind-2.5.4.jar:/Users/cfang/jberet/lib/jackson-annotations-2.5.4.jar:/Users/cfang/dev/jsr352/test-apps/simple/target/simple-1.3.0.Beta6-SNAPSHOT.jar org.jberet.se.Main simple
-
3. Re: Job operator is called then job exits with no log messages
richardmoore May 19, 2017 8:27 AM (in response to cfang)I hope to get the jira done today, dealing with production issues.
-
4. Re: Job operator is called then job exits with no log messages
richardmoore May 19, 2017 10:05 AM (in response to richardmoore)I stripped my code down for testing and here is what I am getting -
package com.awginc.batch;
import java.util.Properties;
import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime;
import javax.batch.runtime.JobExecution;
import com.awginc.batch.system.JavaBatchExecutionMonitor;
public class JobOperatorTest {
public static void main(String[] args) {
System.out.println("Getting operator");
JobOperator operator = BatchRuntime.getJobOperator();
System.out.println("Starting operator");
Properties jobParameters = new Properties();
long jobExecutionId = operator.start("Jberet_Adhoc_SqlTest", jobParameters);
System.out.println(jobExecutionId);
JobExecution execution = operator.getJobExecution(jobExecutionId);
JavaBatchExecutionMonitor.getInstance().monitorToCompletion(execution);
System.out.println("Done");
}
}
I was not getting these messages because I have the org.jboss.weld messages blocked in my log4j so I don't get all of those messages.
Exception in thread "main" java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider org.jberet.operations.JobOperatorImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at javax.batch.runtime.BatchRuntime.getJobOperator(BatchRuntime.java:57)
at JobOperatorTest.main(JobOperatorTest.java:13)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Class<CobolToBeanMapperIface> with qualifiers @BatchProperty
at injection point [BackedAnnotatedField] @Inject @BatchProperty private com.awginc.batch.system.batchlet.cobol.CobolToBeanConverterBatchlet.mapper
at com.awginc.batch.system.batchlet.cobol.CobolToBeanConverterBatchlet.mapper(CobolToBeanConverterBatchlet.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
-
5. Re: Job operator is called then job exits with no log messages
cfang May 19, 2017 10:25 AM (in response to richardmoore)@BatchProperty
Class<CobolToBeanMapperIface> mapperClass;
You may have the above batch property injection. If so, change that to:
@BatchProperty
Class mapperClass;
For batch property injection examples, see jsr352/PropertyInjectionBatchlet.java at master · jberet/jsr352 · GitHub