1

我有一个基于 JSR325(块处理)的 java 批处理程序,并尝试使用 JBERET 实现在 Java SE 模式下运行。我正在遵循这个http://www.mastertheboss.com/javaee/batch-api/running-batch-jobs-in-j2se-applications中提到的方法

Java SE 模式下的 java 批处理程序在 Eclipse 中运行良好,但是当打包为 Jar 并从命令提示符运行时,出现以下异常。

可能是什么问题呢 ?

INFO: WELD-000119: Not generating any bean definitions from org.h2.value.ValueGeometry because of underlying class loading error: Ty
pe com.vividsolutions.jts.geom.CoordinateSequenceFilter not found.  If this is unexpected, enable DEBUG logging to see the full erro
r.
Exception in thread "main" java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider org.jberet.operations.J
obOperatorImpl could not be instantiated
               at java.util.ServiceLoader.fail(ServiceLoader.java:236)
               at java.util.ServiceLoader.access$100(ServiceLoader.java:193)
               at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:389)
               at java.util.ServiceLoader$1.next(ServiceLoader.java:457)
               at javax.batch.runtime.BatchRuntime.getJobOperator(BatchRuntime.java:57)
               at com.citi.Report.App.main(App.java:15)
Caused by: org.jboss.weld.exceptions.DeploymentException: incompatible InnerClasses attribute between "javax.el.BeanELResolver$1" an
d "javax.el.BeanELResolver"
               at org.jboss.weld.executor.AbstractExecutorServices.checkForExceptions(AbstractExecutorServices.java:66)
               at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:43)
               at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:51)
               at org.jboss.weld.bootstrap.ConcurrentBeanDeployer.createClassBeans(ConcurrentBeanDeployer.java:72)
               at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:260)
               at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:351)
               at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:79)
               at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:63)
               at org.jboss.weld.environment.se.Weld.initialize(Weld.java:143)
               at org.jberet.se.SEArtifactFactory.<init>(SEArtifactFactory.java:31)
               at org.jberet.se.BatchSEEnvironment.getArtifactFactory(BatchSEEnvironment.java:89)
               at org.jberet.operations.JobOperatorImpl.<init>(JobOperatorImpl.java:69)
               at java.lang.J9VMInternals.newInstanceImpl(Native Method)
               at java.lang.Class.newInstance(Class.java:1887)
               at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:385)
               ... 3 more
Caused by: java.lang.IncompatibleClassChangeError: incompatible InnerClasses attribute between "javax.el.BeanELResolver$1" and "java
x.el.BeanELResolver"
               at java.lang.Class.getDeclaringClass(Class.java:1034)
               at java.lang.Class.getEnclosingClass(Class.java:2604)
               at org.jboss.weld.util.reflection.Reflections.isNonStaticInnerClass(Reflections.java:388)
               at org.jboss.weld.util.Beans.isTypeManagedBeanOrDecoratorOrInterceptor(Beans.java:486)
               at org.jboss.weld.bootstrap.BeanDeployer.createClassBean(BeanDeployer.java:233)
               at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:74)
               at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$2.doWork(ConcurrentBeanDeployer.java:72)
               at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
               at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
               at java.util.concurrent.FutureTask.run(FutureTask.java:274)
               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
               at java.lang.Thread.run(Thread.java:809)
4

1 回答 1

0

我认为问题在于依赖关系存在一些差异。以下是关于此错误的详细讨论:

是什么导致 java.lang.IncompatibleClassChangeError?

于 2017-10-02T11:31:57.650 回答