6 Replies Latest reply on May 3, 2017 5:38 PM by cfang

    [JBERET000600 + WELD-001333] Error after redeploy

    alessandromoscatelli

      After a fresh start everything works fine on Wildfly 10.1.0.

       

      But if I redeploy my maven application on the application server and I try to start the same job using jberet-ui, the job execution is FAILED and I can see this in the log :

       

      16:40:41,870 WARN  [org.jberet] (Batch Thread - 5) JBERET000001: Failed to run batchlet org.jberet.job.model.RefArtifact@95b142b: java.lang.IllegalStateException: JBERET000600: Failed to create artifact with ref name controllerBatchlet.  Ensure CDI beans.xml is present and batch.xml, if any, is configured properly.

      at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:194)

      at org.jberet.runtime.runner.AbstractRunner.createArtifact(AbstractRunner.java:156)

      at org.jberet.runtime.runner.BatchletRunner.run(BatchletRunner.java:66)

      at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:234)

      at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:150)

      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:60)

      at org.wildfly.extension.batch.jberet.impl.BatchEnvironmentService$WildFlyBatchEnvironment$1.run(BatchEnvironmentService.java:243)

      at org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:497)

      at org.jberet.spi.JobExecutor$2.run(JobExecutor.java:149)

      at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99)

      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)

      at org.jboss.threads.JBossThread.run(JBossThread.java:320)

      Caused by: org.jboss.weld.exceptions.IllegalStateException: WELD-001333: BeanManager method getBeans() is not available after shutdown

      at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerState(BeanManagerProxy.java:239)

      at org.jboss.weld.bean.builtin.BeanManagerProxy.checkContainerState(BeanManagerProxy.java:247)

      at org.jboss.weld.bean.builtin.BeanManagerProxy.getBeans(BeanManagerProxy.java:102)

      at org.wildfly.extension.batch.jberet.impl.WildFlyArtifactFactory.getBean(WildFlyArtifactFactory.java:62)

      at org.wildfly.extension.batch.jberet.impl.WildFlyArtifactFactory.create(WildFlyArtifactFactory.java:53)

      at org.jberet.creation.ArtifactFactoryWrapper.create(ArtifactFactoryWrapper.java:39)

      at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:192)

      ... 15 more

       

      If I restart the application server everything work again.

       

      I already tried to put beans.xml and batch.xml inside META-INF, WEB-INF and to enable non portable mode for WELD.

       

      What else can I do ?

      Please help.