11 Replies Latest reply on Sep 25, 2017 12:02 PM by Cheng Fang

    Failed to create artifact with ref name restItemReader.

    Richard Moore Master

      What could cause the restItemReader to fail to be created? I'm assuming this is defined just like beanIOItemReader or any other reader delivered with Jberet. I have attached the jsl.

       

       

      2017-09-20 08:46:24.835 jberet-1                                  jberet - ERROR item-count=10, time-limit=0, skip-limit=-1, skipCount=0, retry-limit=-1, retryCount=0

      2017-09-20 08:46:24.836 jberet-1                                  jberet - ERROR JBERET000007: Failed to run job Jberet_Adhoc_RestApiTest1, processItems, org.jberet.job.model.Chunk@219b209d

      java.lang.IllegalStateException: JBERET000600: Failed to create artifact with ref name restItemReader.  Ensure CDI beans.xml is present and batch.xml, if any, is configured properly.

        at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:194) ~[jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.AbstractRunner.createArtifact(AbstractRunner.java:156) ~[jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.ChunkRunner.run(ChunkRunner.java:134) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:226) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:147) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:60) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at org.jberet.spi.JobExecutor$1.run(JobExecutor.java:99) [jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]

        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

      Caused by: java.lang.IllegalStateException: JBERET000600: Failed to create artifact with ref name restItemReader.  Ensure CDI beans.xml is present and batch.xml, if any, is configured properly.

        at org.jberet.creation.ArtifactFactoryWrapper.getClassFromBatchXmlOrClassLoader(ArtifactFactoryWrapper.java:65) ~[awg-jberet-framework.jar:?]

        at org.jberet.creation.ArtifactFactoryWrapper.create(ArtifactFactoryWrapper.java:41) ~[awg-jberet-framework.jar:?]

        at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:192) ~[jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        ... 11 more

      Caused by: java.lang.ClassNotFoundException: restItemReader

        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_121]

        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121]

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_121]

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121]

        at org.jberet.creation.ArtifactFactoryWrapper.getClassFromBatchXmlOrClassLoader(ArtifactFactoryWrapper.java:63) ~[awg-jberet-framework.jar:?]

        at org.jberet.creation.ArtifactFactoryWrapper.create(ArtifactFactoryWrapper.java:41) ~[awg-jberet-framework.jar:?]

        at org.jberet.runtime.context.JobContextImpl.createArtifact(JobContextImpl.java:192) ~[jberet-core-1.3.0.Beta3.jar:1.3.0.Beta3]

        ... 11 more