在AIX平台上将ear文件部署到WLS 10.3时出现此错误。同样的耳朵在Windows / Linux平台上运行良好。
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration incompatible with org.apache.xerces.xni.parser.XMLParserConfiguration
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at weblogic.xml.jaxp.WebLogicDocumentBuilderFactory.newDocumentBuilder(WebLogicDocumentBuilderFactory.java:140)
at com.bea.security.xacml.policy.PolicyUtils.getRootNode(PolicyUtils.java:54)
at com.bea.security.xacml.policy.PolicyUtils.read(PolicyUtils.java:86)
at com.bea.security.providers.xacml.store.BasePolicyStore.getAbstractPolicy(BasePolicyStore.java:1251)
at com.bea.security.providers.xacml.store.BasePolicyStore.readPolicy(BasePolicyStore.java:1231)
at com.bea.security.providers.xacml.store.BasePolicyStore.readPolicy(BasePolicyStore.java:1114)
at com.bea.security.providers.xacml.entitlement.PolicyManager.listPolicies(PolicyManager.java:747)
at weblogic.security.providers.xacml.DeployableAuthorizationProviderV2Helper.startDeployPolicies(DeployableAuthorizationProviderV2Helper.java:90)
at weblogic.security.providers.xacml.authorization.XACMLAuthorizationProviderImpl.startDeployPolicies(XACMLAuthorizationProviderImpl.java:269)
at com.bea.common.security.internal.legacy.service.PolicyDeployerProviderImpl$V2Adapter.startDeployPolicies(PolicyDeployerProviderImpl.java:69)
at com.bea.common.security.internal.service.PolicyDeploymentServiceImpl$DeploymentHandlerImpl.<init>(PolicyDeploymentServiceImpl.java:143)
at com.bea.common.security.internal.service.PolicyDeploymentServiceImpl$DeploymentHandlerImpl.<init>(PolicyDeploymentServiceImpl.java:129)
at com.bea.common.security.internal.service.PolicyDeploymentServiceImpl$ServiceImpl.startDeployPolicies(PolicyDeploymentServiceImpl.java:97)
at weblogic.security.service.WLSPolicyDeploymentServiceWrapper$DeploymentHandlerImpl.<init>(WLSPolicyDeploymentServiceWrapper.java:70)
at weblogic.security.service.WLSPolicyDeploymentServiceWrapper$DeploymentHandlerImpl.<init>(WLSPolicyDeploymentServiceWrapper.java:60)
at weblogic.security.service.WLSPolicyDeploymentServiceWrapper.startDeployPolicies(WLSPolicyDeploymentServiceWrapper.java:40)
at weblogic.security.service.AuthorizationManager.startDeployPolicies(AuthorizationManager.java:489)
at weblogic.servlet.security.internal.WebAppSecurityWLS.<init>(WebAppSecurityWLS.java:72)
at weblogic.servlet.security.internal.ServletSecurityManager.<init>(ServletSecurityManager.java:39)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:416)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:464)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:414)
at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:901)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:345)
答案 0 :(得分:8)
您的类路径可能会与Xerces API的不同版本化JAR文件混在一起。清理类路径。如果是网络应用,则包含Webapp/WEB-INF/lib
,Appserver/lib
和/JRE/lib
个文件夹。
最常见的原因是您在Webapp/WEB-INF/lib
和Appserver/lib
上传播了不同版本的Xerces JAR。假设appserver库中的那些是默认提供的和正确的版本,请删除webapp库中的那些。您不应该在webapp的库中拥有任何特定于appserver的JAR。