Xerces XML解析问题:'没有两个架构应该共享相同的targetNamespace'。怎么解决?

时间:2014-09-01 20:18:54

标签: java namespaces weblogic xerces weld

我正在尝试让web应用程序在weblogic服务器上运行,但它会抛出一个异常,告诉我有多个xml文件使用相同的命名空间。我搜索了所有的XML,我找不到任何东西!

它抛出以下异常:

<01/09/2014 16h58min32s BRT> <Warning> <HTTP> <BEA-101162> <User defined listener org.jboss.weld.servlet.WeldListener failed: java.lang.IllegalStateException: Singleton not set for STATIC_INSTANCE => [].
java.lang.IllegalStateException: Singleton not set for STATIC_INSTANCE => []
at org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider$RegistrySingleton.get(RegistrySingletonProvider.java:28)
at org.jboss.weld.Container.instance(Container.java:55)
at org.jboss.weld.SimpleCDI.<init>(SimpleCDI.java:77)
at org.jboss.weld.servlet.StaticWeldProvider$EnhancedCDI.<init>(StaticWeldProvider.java:27)
at org.jboss.weld.servlet.StaticWeldProvider$EnhancedCDI.<init>(StaticWeldProvider.java:27)
Truncated. see log file for complete stacktrace
> 
<01/09/2014 16h58min33s BRT> <Warning> <HTTP> <BEA-101162> <User defined listener org.jboss.weld.environment.servlet.Listener failed: java.lang.IllegalArgumentException:  When using array of Objects as the value of SCHEMA_SOURCE property , no two Schemas should share the same targetNamespace. .
java.lang.IllegalArgumentException:  When using array of Objects as the value of SCHEMA_SOURCE property , no two Schemas should share the same targetNamespace. 
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:839)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:605)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2453)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1772)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:746)
Truncated. see log file for complete stacktrace"

1 个答案:

答案 0 :(得分:0)

由于weblogic 10与焊接不兼容而发生了这个问题。要解决这个问题,我必须将内容更改为weblogic jar,因此根本无法使用该版本的weblogic。我改为更高版本和weblogic,它工作正常。