Java EclipseXML解析器“;供应商“;与rt.jar冲突
请注意:虽然有几个问题需要粘贴到类似的异常和堆栈跟踪中,但这个问题绝对不是其中任何一个的重复,因为我正在试图了解我的类加载哪里出了问题 大家好,这里是Java8/Groovy2.4.3/EclipseLuna。我正在使用(以编程方式控制一个强大的负载平衡器),它反过来使用ApacheAxis1.4。在使用Axis1.4时,我得到了以下stacktrace(来自Eclipse控制台): 好的,LN 221是对Java EclipseXML解析器“;供应商“;与rt.jar冲突,java,xml-parsing,classpath,jaxp,rt.jar,Java,Xml Parsing,Classpath,Jaxp,Rt.jar,请注意:虽然有几个问题需要粘贴到类似的异常和堆栈跟踪中,但这个问题绝对不是其中任何一个的重复,因为我正在试图了解我的类加载哪里出了问题 大家好,这里是Java8/Groovy2.4.3/EclipseLuna。我正在使用(以编程方式控制一个强大的负载平衡器),它反过来使用ApacheAxis1.4。在使用Axis1.4时,我得到了以下stacktrace(来自Eclipse控制台): 好的,LN 221是对DocumentBuilderFactory.newInstance()的调用,让我们看一
DocumentBuilderFactory.newInstance()
的调用,让我们看一下:
public static DocumentBuilderFactory newInstance() {
return FactoryFinder.find(
/* The default property name according to the JAXP spec */
DocumentBuilderFactory.class, // "javax.xml.parsers.DocumentBuilderFactory"
/* The fallback implementation class name */
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
}
情节越来越复杂了!现在让我们来看看<代码> FaseYfField.查找< /C> >:
static <T> T find(Class<T> type, String fallbackClassName)
throws FactoryConfigurationError
{
final String factoryId = type.getName();
dPrint("find factoryId =" + factoryId);
// lots of nasty cruft omitted for brevity...
// Try Jar Service Provider Mechanism
T provider = findServiceProvider(type);
if (provider != null) {
return provider;
}
if (fallbackClassName == null) {
throw new FactoryConfigurationError(
"Provider for " + factoryId + " cannot be found"); // <<-- Ahh, here we go
}
dPrint("loaded from fallback value: " + fallbackClassName);
return newInstance(type, fallbackClassName, null, true);
}
static T find(类类型,字符串fallbackClassName)
抛出FactoryConfigurationError
{
最后一个字符串factoryId=type.getName();
dPrint(“find factoryId=“+factoryId”);
//为了简洁起见,省略了很多肮脏的东西。。。
//尝试Jar服务提供者机制
T provider=findServiceProvider(类型);
if(提供程序!=null){
退货供应商;
}
if(fallbackClassName==null){
抛出新FactoryConfigurationError(
“找不到“+factoryId+”的提供程序”)//
public static DocumentBuilderFactory newInstance() {
return FactoryFinder.find(
/* The default property name according to the JAXP spec */
DocumentBuilderFactory.class, // "javax.xml.parsers.DocumentBuilderFactory"
/* The fallback implementation class name */
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
}
static <T> T find(Class<T> type, String fallbackClassName)
throws FactoryConfigurationError
{
final String factoryId = type.getName();
dPrint("find factoryId =" + factoryId);
// lots of nasty cruft omitted for brevity...
// Try Jar Service Provider Mechanism
T provider = findServiceProvider(type);
if (provider != null) {
return provider;
}
if (fallbackClassName == null) {
throw new FactoryConfigurationError(
"Provider for " + factoryId + " cannot be found"); // <<-- Ahh, here we go
}
dPrint("loaded from fallback value: " + fallbackClassName);
return newInstance(type, fallbackClassName, null, true);
}