首页 > 解决方案 > 使用无效的 JAXP api 运行或使用 ant 实现 axis2

问题描述

我正在尝试通过调用axis2从wsdl文件生成axis2-1.7.9存根文件classname="org.apache.axis2.tool.ant.AntCodegenTask"

但我不断收到以下错误:

    java.lang.RuntimeException: java.lang.IllegalStateException: 
    You are running with invalid JAXP api or implementation.
    JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required.
    In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). 
    If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.
   

在类路径中,我正在使用 xalan-2.7.2.jar, xml-apis-1.4.01.jar and xercesImpl-2.12.1.jar

我的蚂蚁版本是: Apache Ant(TM) version 1.9.1 compiled on May 15 2013

我的java版本是:java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b15)

我不明白这是什么问题?我在这里缺少什么?版本 1.3.1 的 JAXP 来自哪里?

我还用xml-apis-1.4.01.jar and xercesImpl-2.12.1.jar

仍然没有运气....我做错了什么?

标签: javaantaxis2jaxp

解决方案


更新java后问题解决了。显然,java本身使用了它。


推荐阅读