-
Bug
-
Resolution: Done
-
Major
-
1.0.0.Final
-
None
Certain tests (e.g., PropertyInjectionIT, PostConstructIT) uses US date format, and fail when running in non-US locales. JBeret fails to inject them to java.util.Date fields based on the current default locale.
Need to temporarily switch to Locale.US to run these tests.
The stack trace:
十一月 06, 2014 10:55:33 下午 org.jberet.runtime.runner.BatchletRunner run WARN: JBERET000001: Failed to run batchlet org.jberet.job.model.RefArtifact@7312c7dd java.lang.IllegalStateException: JBERET000600: Failed to create artifact with ref name batchlet1. Ensure CDI beans.xml is present and batch.xml, if any, is configured properly. at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:196) at org.jberet.runtime.runner.AbstractRunner.createArtifact(AbstractRunner.java:147) at org.jberet.runtime.runner.BatchletRunner.run(BatchletRunner.java:63) at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:209) at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:139) at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164) at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88) at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: javax.batch.operations.BatchRuntimeException: JBERET000619: Failed to inject value 5/16/2013 into field private java.util.Date org.jberet.testapps.postconstruct.Batchlet1.date at org.jberet.creation.ValueConverter.parseDate(ValueConverter.java:501) at org.jberet.creation.ValueConverter.convertSingleValue(ValueConverter.java:313) at org.jberet.creation.ValueConverter.convertFieldValue(ValueConverter.java:143) at org.jberet.creation.BatchBeanProducer.getProperty(BatchBeanProducer.java:387) at org.jberet.creation.BatchBeanProducer.getDate(BatchBeanProducer.java:223) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:69) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:740) at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:831) at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92) at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:365) at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:376) at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:70) at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:65) at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:109) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:150) at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:69) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:740) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:760) at org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61) at org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:78) at org.jberet.se.SEArtifactFactory.create(SEArtifactFactory.java:44) at org.jberet.creation.ArtifactFactoryWrapper.create(ArtifactFactoryWrapper.java:39) at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:194) ... 12 more