jar文件与不同的maven(同一版本)不同?

时间:2012-06-14 14:11:22

标签: maven-2

从我的本地maven(2.0.8)生成的jar文件与从企业中心版本(maven 2.0.8)生成的jar文件不同。所有源代码和pom文件都是相同的,以及存储库链接。但是当我使用来自中央构建的jar运行作业时,这是错误消息:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
    at java.lang.reflect.Field.get(Field.java:358)
    at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
    (deleted....)
    ... 15 more


Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
    ... 17 more


Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled schema: Incompatible minor version - expecting up to 23, got 24 (schemaorg_apache_xmlbeans.system.s4260D8D66C8BD97BA7A1A374DB7D9EB0.index) - code 3
    at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1522)
    at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:260)
    at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:183)
    ... 21 more

但是使用从我当地的maven生成的jar文件成功运行了作业。

为了解决这个问题,你能否给我任何建议?

1 个答案:

答案 0 :(得分:0)

首先我建议至少更新你的Maven安装到Maven 2.0.11(这是最新的2.0系列),但对Maven 3更好...... 我会检查你是否在两个区域使用相同的java编译器

相关问题