我使用Spring MVC,weblogic 10.3.6。
我有一个jsp。 taglib声明是
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page trimDirectiveWhitespaces="true"%>
<!DOCTYPE html>
<html>
<head>
我的项目部署得很好。当我执行它时,我得到一个异常
"java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
Maven依赖树
[INFO] ecalcpAdmin:ecalcpAdmin:war:0.0.1-SNAPSHOT
[INFO] +- org.springframework:spring-context:jar:3.2.6.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.2.6.RELEASE:compile
[INFO] | | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-beans:jar:3.2.6.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-core:jar:3.2.6.RELEASE:compile
[INFO] | | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1.3)
[INFO] | \- org.springframework:spring-expression:jar:3.2.6.RELEASE:compile
[INFO] | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-webmvc:jar:3.2.6.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-expression:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-web:jar:3.2.6.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- (org.springframework:spring-aop:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-orm:jar:3.2.6.RELEASE:compile
[INFO] | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-jdbc:jar:3.2.6.RELEASE:compile
[INFO] | | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-tx:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- org.springframework:spring-tx:jar:3.2.6.RELEASE:compile
[INFO] | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- taglibs:standard:jar:1.1.2:compile
[INFO] +- antlr:antlr:jar:2.7.7:compile
[INFO] +- org.hibernate:hibernate-c3p0:jar:4.1.3.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
[INFO] | +- c3p0:c3p0:jar:0.9.1:compile
[INFO] | \- (org.hibernate:hibernate-core:jar:4.1.3.Final:compile - omitted for duplicate)
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] +- org.hibernate:hibernate-core:jar:4.1.3.Final:compile
[INFO] | +- (antlr:antlr:jar:2.7.7:compile - omitted for duplicate)
[INFO] | +- (org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile - omitted for duplicate)
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] | +- org.javassist:javassist:jar:3.15.0-GA:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile
[INFO] | \- (org.jboss.logging:jboss-logging:jar:3.1.0.CR2:compile - omitted for conflict with 3.1.0.GA)
[INFO] +- com.oracle:ojdbc6:jar:11.2.0:compile
[INFO] +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] +- org.jasypt:jasypt-spring31:jar:1.9.2:compile
[INFO] | \- (org.jasypt:jasypt:jar:1.9.2:compile - omitted for duplicate)
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.51:compile
[INFO] +- org.hibernate:hibernate-ehcache:jar:4.1.3.Final:compile
[INFO] | +- (org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile - omitted for duplicate)
[INFO] | +- net.sf.ehcache:ehcache-core:jar:2.4.3:compile
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.6.1:compile - omitted for conflict with 1.6.6)
[INFO] | \- (org.hibernate:hibernate-core:jar:4.1.3.Final:compile - omitted for duplicate)
[INFO] +- net.sf.ehcache:ehcache:jar:2.7.2:compile
[INFO] | \- (org.slf4j:slf4j-api:jar:1.6.6:compile - omitted for conflict with 1.5.10)
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.7:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | \- org.tukaani:xz:jar:1.0:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.3:compile
[INFO] +- org.jsoup:jsoup:jar:1.8.1:compile
[INFO] +- org.springframework.mobile:spring-mobile-device:jar:1.1.5.RELEASE:compile
[INFO] | +- (org.springframework:spring-webmvc:jar:3.2.13.RELEASE:compile - omitted for conflict with 3.2.6.RELEASE)
[INFO] | \- (org.springframework:spring-web:jar:3.2.13.RELEASE:compile - omitted for conflict with 3.2.6.RELEASE)
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] +- org.hibernate:hibernate-validator-annotation-processor:jar:4.1.0.Final:compile
[INFO] | \- org.hibernate:hibernate-validator:jar:4.1.0.Final:compile
[INFO] | +- (javax.validation:validation-api:jar:1.0.0.GA:compile - omitted for duplicate)
[INFO] | \- (org.slf4j:slf4j-api:jar:1.5.6:compile - omitted for conflict with 1.6.6)
[INFO] +- edu.vt.middleware:vt-password:jar:3.1.2:compile
[INFO] | +- edu.vt.middleware:vt-dictionary:jar:3.0:compile
[INFO] | \- edu.vt.middleware:vt-crypt:jar:2.1.4:compile
[INFO] | +- org.bouncycastle:bcprov-jdk15:jar:1.45:compile
[INFO] | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1.3)
[INFO] +- commons-codec:commons-codec:jar:1.5:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.7.4:compile
[INFO] +- commons-io:commons-io:jar:1.3.2:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.10:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.10:compile
[INFO] +- org.springframework:spring-context-support:jar:3.2.6.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:compile - omitted for duplicate)
[INFO] +- org.slf4j:slf4j-api:jar:1.5.10:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.5.10:runtime
[INFO] | \- (org.slf4j:slf4j-api:jar:1.5.10:runtime - omitted for duplicate)
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.5.10:runtime
[INFO] | +- (org.slf4j:slf4j-api:jar:1.5.10:runtime - omitted for duplicate)
[INFO] | \- (log4j:log4j:jar:1.2.14:runtime - omitted for conflict with 1.2.15)
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO] +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] | +- (org.hamcrest:hamcrest-core:jar:1.1:test - omitted for conflict with 1.3)
[INFO] | \- org.objenesis:objenesis:jar:1.0:test
[INFO] +- org.springframework:spring-test:jar:3.2.6.RELEASE:test
[INFO] | \- (org.springframework:spring-core:jar:3.2.6.RELEASE:test - omitted for duplicate)
[INFO] +- org.apache.poi:poi:jar:3.6:compile
[INFO] | +- (commons-logging:commons-logging:jar:1.1:runtime - omitted for conflict with 1.1.3)
[INFO] | \- (log4j:log4j:jar:1.2.13:runtime - omitted for conflict with 1.2.15)
[INFO] \- org.owasp.esapi:esapi:jar:2.1.0:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.5:compile
[INFO] | +- (commons-collections:commons-collections:jar:3.2:compile - omitted for duplicate)
[INFO] | +- (commons-lang:commons-lang:jar:2.3:compile - omitted for duplicate)
[INFO] | +- (commons-logging:commons-logging:jar:1.1:compile - omitted for conflict with 1.1.3)
[INFO] | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | | \- (commons-logging:commons-logging:jar:1.0.3:compile - omitted for conflict with 1.1.3)
[INFO] | | \- (commons-logging:commons-logging:jar:1.1:compile - omitted for conflict with 1.1.3)
[INFO] | \- (commons-beanutils:commons-beanutils-core:jar:1.7.0:compile - omitted for duplicate)
[INFO] +- commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
[INFO] | +- (commons-logging:commons-logging:jar:1.0:compile - omitted for conflict with 1.1.3)
[INFO] | \- (commons-collections:commons-collections:jar:2.0:compile - omitted for conflict with 3.2)
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2:compile
[INFO] +- commons-collections:commons-collections:jar:3.2:compile
[INFO] +- (log4j:log4j:jar:1.2.16:compile - omitted for conflict with 1.2.15)
[INFO] +- xom:xom:jar:1.2.5:compile
[INFO] | +- xml-apis:xml-apis:jar:1.3.03:compile
[INFO] | +- xerces:xercesImpl:jar:2.8.0:compile
[INFO] | | \- (xml-apis:xml-apis:jar:1.3.03:compile - omitted for duplicate)
[INFO] | \- xalan:xalan:jar:2.7.0:compile
[INFO] | \- (xml-apis:xml-apis:jar:1.0.b2:compile - omitted for conflict with 1.3.03)
[INFO] +- org.beanshell:bsh-core:jar:2.0b4:compile
[INFO] \- org.owasp.antisamy:antisamy:jar:1.4.3:compile
[INFO] +- (xerces:xercesImpl:jar:2.8.1:compile - omitted for conflict with 2.8.0)
[INFO] +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] | | \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for conflict with 1.3.03)
[INFO] | +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] | +- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for conflict with 1.3.03)
[INFO] | \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] +- net.sourceforge.nekohtml:nekohtml:jar:1.9.12:compile
[INFO] | \- (xerces:xercesImpl:jar:2.8.1:compile - omitted for conflict with 2.8.0)
[INFO] \- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- (commons-logging:commons-logging:jar:1.0.4:compile - omitted for conflict with 1.1.3)
[INFO] \- (commons-codec:commons-codec:jar:1.2:compile - omitted for conflict with 1.5)
weblogic.xml是
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
<wls:weblogic-version>10.3.6</wls:weblogic-version>
<wls:context-root>EcalpAdmin</wls:context-root>
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
</wls:weblogic-web-app>
我不知道为什么会得到这个例外。
修改
我的上一个问题与此之间的区别在于以下依赖关系。我有一个新的依赖。
[INFO] \- org.owasp.esapi:esapi:jar:2.1.0:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.5:compile
[INFO] | +- (commons-collections:commons-collections:jar:3.2:compile - omitted for duplicate)
[INFO] | +- (commons-lang:commons-lang:jar:2.3:compile - omitted for duplicate)
[INFO] | +- (commons-logging:commons-logging:jar:1.1:compile - omitted for conflict with 1.1.3)
[INFO] | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | | \- (commons-logging:commons-logging:jar:1.0.3:compile - omitted for conflict with 1.1.3)
[INFO] | | \- (commons-logging:commons-logging:jar:1.1:compile - omitted for conflict with 1.1.3)
[INFO] | \- (commons-beanutils:commons-beanutils-core:jar:1.7.0:compile - omitted for duplicate)
[INFO] +- commons-beanutils:commons-beanutils-core:jar:1.7.0:compile
[INFO] | +- (commons-logging:commons-logging:jar:1.0:compile - omitted for conflict with 1.1.3)
[INFO] | \- (commons-collections:commons-collections:jar:2.0:compile - omitted for conflict with 3.2)
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2:compile
[INFO] +- commons-collections:commons-collections:jar:3.2:compile
[INFO] +- (log4j:log4j:jar:1.2.16:compile - omitted for conflict with 1.2.15)
[INFO] +- xom:xom:jar:1.2.5:compile
[INFO] | +- xml-apis:xml-apis:jar:1.3.03:compile
[INFO] | +- xerces:xercesImpl:jar:2.8.0:compile
[INFO] | | \- (xml-apis:xml-apis:jar:1.3.03:compile - omitted for duplicate)
[INFO] | \- xalan:xalan:jar:2.7.0:compile
[INFO] | \- (xml-apis:xml-apis:jar:1.0.b2:compile - omitted for conflict with 1.3.03)
[INFO] +- org.beanshell:bsh-core:jar:2.0b4:compile
[INFO] \- org.owasp.antisamy:antisamy:jar:1.4.3:compile
[INFO] +- (xerces:xercesImpl:jar:2.8.1:compile - omitted for conflict with 2.8.0)
[INFO] +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO] | +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO] | | \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for conflict with 1.3.03)
[INFO] | +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
[INFO] | +- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for conflict with 1.3.03)
[INFO] | \- xml-apis:xml-apis-ext:jar:1.3.04:compile
[INFO] +- net.sourceforge.nekohtml:nekohtml:jar:1.9.12:compile
[INFO] | \- (xerces:xercesImpl:jar:2.8.1:compile - omitted for conflict with 2.8.0)
[INFO] \- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] +- (commons-logging:commons-logging:jar:1.0.4:compile - omitted for conflict with 1.1.3)
[INFO] \- (commons-codec:commons-codec:jar:1.2:compile - omitted for conflict with 1.5)
我必须删除吗?
(xml-apis:xml-apis:jar:1.3.03:compile - 省略重复)
由于 已编辑(解决方案)
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.1.0</version>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>