- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 java 类负责连接到 Web 服务以验证证书,情况是当我采取步骤调用 WS 时,它返回以下错误:java.lang.NoSuchMethodError: org.apache.xml.security.transforms.Transform.init () V
我尝试过删除库,但不起作用。
我的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.onelogin</groupId>
<artifactId>java-saml-tookit-samples</artifactId>
<version>2.0.1</version>
</parent>
<artifactId>samlAutentica</artifactId>
<packaging>war</packaging>
<name>samlAutentica</name>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.onelogin</groupId>
<artifactId>java-saml</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
<version>2.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
<version>1.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>3.7.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-6</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>com.liferay</groupId>
<artifactId>nl.captcha.simplecaptcha</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<version>2.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.5.8</version>
</dependency>
</dependencies>
堆栈跟踪
java.lang.NoSuchMethodError:
org.apache.xml.security.transforms.Transform.init()V
org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:253)
org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:269)
org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:278)
org.apache.ws.security.WSSConfig.getDefaultWSConfig(WSSConfig.java:287)
org.apache.ws.security.message.WSSecBase.<init>(WSSecBase.java:47)
org.apache.ws.security.message.WSSecSignature.<init>
(WSSecSignature.java:126)
es.sag.autentica.afirma.ClientHandler.createBinarySecurityToken(ClientHandle
r.java:209)
es.sag.autentica.afirma.ClientHandler.invoke(ClientHandler.java:107)
org.apache.axis.client.AxisClient.invoke(AxisClient.java:121)
org.apache.axis.client.Call.invokeEngine(Call.java:2784)
org.apache.axis.client.Call.invoke(Call.java:2767)
org.apache.axis.client.Call.invoke(Call.java:2443)
org.apache.axis.client.Call.invoke(Call.java:2366)
org.apache.axis.client.Call.invoke(Call.java:1812)
es.sag.autentica.afirma.RequestConstructor.invokeWS(RequestConstructor.java:
175)
es.sag.autentica.afirma.certificado.Certificado.<init>(Certificado.java:105)
es.sag.autentica.saml.utils.Utility.validateCertificate(Utility.java:783)
org.apache.jsp.index_jsp._jspService(index_jsp.java:130)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:4
43)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
谢谢!
最佳答案
正如我在第一条评论中建议的那样。您有冲突的 jar xmlsec.jar
作为来自具有许多不同版本的其他 jar 的依赖项导入到您的项目中(我数了 3 个版本)。所有 3 个版本中,版本 1.5.6
之一最终被选中,这是缺少 init()
的那个方法wss4j.jar:1.5.6
来电。
这可以通过调用maven中的依赖树来观察,我在这里发布结果:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.onelogin:samlAutentica:war:2.0.1
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.ldap:spring-ldap-core:jar -> version 2.3.1.RELEASE vs 1.3.1.RELEASE @ line 165, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-webmvc:jar -> version 3.1.2.RELEASE vs 3.0.3.RELEASE @ line 215, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building samlAutentica 2.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ samlAutentica ---
[INFO] com.onelogin:samlAutentica:war:2.0.1
[INFO] +- com.onelogin:java-saml:jar:2.0.1:compile
[INFO] | +- com.onelogin:java-saml-core:jar:2.0.1:compile
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.12:compile - version managed from 1.7.14; omitted for duplicate)
[INFO] | | +- (joda-time:joda-time:jar:2.9.4:compile - omitted for duplicate)
[INFO] | | +- (org.apache.commons:commons-lang3:jar:3.4:compile - omitted for duplicate)
[INFO] | | +- (org.apache.santuario:xmlsec:jar:2.0.7:compile - omitted for duplicate)
[INFO] | | \- (commons-codec:commons-codec:jar:1.10:compile - omitted for duplicate)
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] | +- joda-time:joda-time:jar:2.9.4:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] | +- (org.apache.santuario:xmlsec:jar:2.0.7:compile - omitted for conflict with 1.5.8)
[INFO] | \- commons-codec:commons-codec:jar:1.10:compile
[INFO] +- org.apache.axis:axis:jar:1.4:compile
[INFO] +- log4j:log4j:jar:1.2.15:provided (scope not updated to compile)
[INFO] | \- (javax.mail:mail:jar:1.4:provided - omitted for duplicate)
[INFO] +- org.apache.logging.log4j:log4j-1.2-api:jar:2.3:compile
[INFO] | +- org.apache.logging.log4j:log4j-api:jar:2.3:compile
[INFO] | \- org.apache.logging.log4j:log4j-core:jar:2.3:compile
[INFO] | \- (org.apache.logging.log4j:log4j-api:jar:2.3:compile - omitted for duplicate)
[INFO] +- org.apache.ws.security:wss4j:jar:1.5.6:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1:compile
[INFO] | | +- (log4j:log4j:jar:1.2.12:compile - omitted for conflict with 1.2.15)
[INFO] | | +- logkit:logkit:jar:1.0.1:compile
[INFO] | | +- avalon-framework:avalon-framework:jar:4.1.3:compile
[INFO] | | \- (javax.servlet:servlet-api:jar:2.3:compile - omitted for conflict with 2.5)
[INFO] | +- (org.apache.santuario:xmlsec:jar:1.4.2:compile - omitted for conflict with 2.0.7)
[INFO] | +- xalan:xalan:jar:2.7.1:compile
[INFO] | | \- xalan:serializer:jar:2.7.1:compile
[INFO] | | \- (xml-apis:xml-apis:jar:1.3.04:compile - omitted for conflict with 1.0.b2)
[INFO] | \- bouncycastle:bcprov-jdk14:jar:140:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided (scope not updated to compile)
[INFO] +- org.springframework.ldap:spring-ldap-core:jar:1.3.1.RELEASE:compile
[INFO] | +- (commons-logging:commons-logging:jar:1.0.4:compile - omitted for conflict with 1.1)
[INFO] | +- (commons-lang:commons-lang:jar:2.5:compile - omitted for conflict with 2.6)
[INFO] | +- (org.springframework:spring-core:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | \- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO] | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-aop:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] | \- (org.springframework:spring-core:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] +- javax.xml:jaxrpc-api:jar:1.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.jdom:jdom:jar:1.1:compile
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- org.springframework.security:spring-security-cas:jar:3.1.0.RELEASE:compile
[INFO] | +- (org.springframework.security:spring-security-web:jar:3.1.0.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- org.jasig.cas.client:cas-client-core:jar:3.1.12:compile
[INFO] | | \- (commons-logging:commons-logging:jar:1.1:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-web:jar:3.0.6.RELEASE:compile
[INFO] | | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | | +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | | \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- (org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] +- org.springframework.security:spring-security-config:jar:3.0.5.RELEASE:compile
[INFO] | \- (org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
[INFO] +- org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile
[INFO] | +- (org.springframework:spring-expression:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- (org.springframework:spring-context:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] | +- (org.springframework:spring-tx:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- (org.springframework:spring-aop:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.aspectj:aspectjrt:jar:1.6.8:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.6.8:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:3.0.5.RELEASE:compile
[INFO] | +- (org.springframework.security:spring-security-web:jar:3.0.5.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
[INFO] | +- org.springframework.security:spring-security-acl:jar:3.0.5.RELEASE:compile
[INFO] | | +- (org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context-support:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-jdbc:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] | \- (org.springframework:spring-web:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] +- org.springframework.security:spring-security-web:jar:3.0.5.RELEASE:compile
[INFO] | +- (org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- (org.springframework:spring-asm:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | \- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
[INFO] | \- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] +- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
[INFO] | +- (org.springframework:spring-aop:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- (org.springframework:spring-expression:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-asm:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-context-support:jar:3.0.3.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
[INFO] | +- (org.springframework:spring-asm:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO] | \- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-jdbc:jar:3.0.3.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-tx:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] +- net.sf.jasperreports:jasperreports:jar:3.7.5:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] | | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] | +- commons-collections:commons-collections:jar:2.1:compile
[INFO] | +- commons-digester:commons-digester:jar:1.7:compile
[INFO] | | +- (commons-beanutils:commons-beanutils:jar:1.6:compile - omitted for conflict with 1.8.0)
[INFO] | | +- (commons-logging:commons-logging:jar:1.0:compile - omitted for conflict with 1.1)
[INFO] | | +- (commons-collections:commons-collections:jar:2.1:compile - omitted for duplicate)
[INFO] | | \- (xml-apis:xml-apis:jar:1.0.b2:compile - omitted for duplicate)
[INFO] | +- (commons-logging:commons-logging:jar:1.0.2:compile - omitted for conflict with 1.1)
[INFO] | +- com.lowagie:itext:jar:2.1.7:compile
[INFO] | | +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] | | +- (bouncycastle:bcprov-jdk14:jar:138:compile - omitted for conflict with 140)
[INFO] | | \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] | | +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] | | \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] | | \- (org.bouncycastle:bcprov-jdk14:jar:1.38:compile - omitted for duplicate)
[INFO] | +- jfree:jcommon:jar:1.0.15:compile
[INFO] | +- jfree:jfreechart:jar:1.0.12:compile
[INFO] | | \- (jfree:jcommon:jar:1.0.15:compile - omitted for duplicate)
[INFO] | +- (xml-apis:xml-apis:jar:1.3.02:compile - omitted for conflict with 1.0.b2)
[INFO] | \- eclipse:jdtcore:jar:3.1.0:compile
[INFO] +- org.json:json:jar:20160810:compile
[INFO] +- org.springframework:spring:jar:2.5.6:compile
[INFO] | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] +- org.springframework:spring-webmvc:jar:3.0.3.RELEASE:compile
[INFO] | +- (org.springframework:spring-asm:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context-support:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-expression:jar:3.0.3.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:3.0.3.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] +- org.opensaml:opensaml:jar:1.1:compile
[INFO] +- javax.mail:mail:jar:1.4:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- jaxen:jaxen:jar:1.1-beta-6:compile
[INFO] | +- (jaxen:jaxen:jar:1.1-beta-4:compile - omitted for cycle)
[INFO] | +- (dom4j:dom4j:jar:1.5.2:compile - omitted for conflict with 1.6.1)
[INFO] | +- (jaxen:jaxen:jar:1.0-FCS:compile - omitted for cycle)
[INFO] | +- jdom:jdom:jar:1.0:compile
[INFO] | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | +- xerces:xercesImpl:jar:2.6.2:compile
[INFO] | \- xom:xom:jar:1.0b3:compile
[INFO] | +- (xerces:xmlParserAPIs:jar:2.6.1:compile - omitted for conflict with 2.6.2)
[INFO] | +- (xerces:xercesImpl:jar:2.2.1:compile - omitted for conflict with 2.6.2)
[INFO] | +- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] | +- (xalan:xalan:jar:2.6.0:compile - omitted for conflict with 2.7.1)
[INFO] | \- org.ccil.cowan.tagsoup:tagsoup:jar:0.9.7:compile
[INFO] +- commons-discovery:commons-discovery:jar:0.4:compile
[INFO] | \- (commons-logging:commons-logging:jar:1.0.4:compile - omitted for conflict with 1.1)
[INFO] +- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] +- com.liferay:nl.captcha.simplecaptcha:jar:1.1.1:compile
[INFO] +- org.springframework.webflow:spring-webflow:jar:2.3.3.RELEASE:compile
[INFO] | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] | +- opensymphony:ognl:jar:2.6.11:compile
[INFO] | +- org.springframework.webflow:spring-binding:jar:2.3.3.RELEASE:compile
[INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] | | +- (opensymphony:ognl:jar:2.6.11:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | +- (org.springframework:spring-context:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | +- (org.springframework:spring-core:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | \- (org.springframework:spring-expression:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- org.springframework.webflow:spring-js:jar:2.3.3.RELEASE:compile
[INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] | | +- org.springframework.webflow:spring-js-resources:jar:2.3.3.RELEASE:compile
[INFO] | | +- (org.springframework:spring-beans:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | +- (org.springframework:spring-context:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | +- (org.springframework:spring-core:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | | +- (org.springframework:spring-web:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] | | \- (org.springframework:spring-webmvc:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-context:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-core:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-expression:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] | +- (org.springframework:spring-web:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
[INFO] | \- (org.springframework:spring-webmvc:jar:4.0.0.RELEASE:compile - omitted for conflict with 3.0.3.RELEASE)
[INFO] \- org.apache.santuario:xmlsec:jar:1.5.8:compile
[INFO] \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.336s
[INFO] Finished at: Fri Sep 29 15:03:00 EEST 2017
[INFO] Final Memory: 13M/245M
[INFO] ------------------------------------------------------------------------
首先,为什么您有 org.springframework.ldap:spring-ldap-core:jar
的重复依赖项和org.springframework:spring-webmvc:jar
?您应该只保留一个。
其次,数一下有多少次org.apache.santuario:xmlsec
出现了多少个不同的版本(我数了4次,有3个不同的版本: 2.0.7
、 1.4.2
、 1.5.8
。前两个因冲突而被省略,选择的是最后一个 1.5.8
,缺少 init
方法。
所以,你有一个非常困惑的pom.xml
就依赖性而言。您应该尝试清理它并仅使用您需要的依赖项。例如你应该 要么尝试降级/排除所有要使用的xmlsec-1.4.2
并摆脱你的xmlsec-1.5.8
依赖项,或升级所有内容以使用 xmlsec-1.5.8
。我发现wss4j-1.6.19
与xmlsec-1.5.8
一起工作所以删除你的 xmlsec
依赖并更改 wss4j
的版本依赖于1.6.19
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.6.19</version>
</dependency>
执行mvn clean
在再次构建/运行您的项目之前清理您的目标和依赖项。
更新不要删除您的xmlsec-1.5.8
依赖性,因为来自 com.onelogin:java-saml:jar:2.0.1
的一个将会占上风。只需让它存在并尝试构建/运行您的项目
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.5.8</version>
</dependency>
我建议你也降级com.onelogin:java-saml:jar:2.0.1
到依赖于 xmlsec-1.5.8
的版本而不是2.0.7
。尝试使您的依赖项尽可能干净,并且mvn dependency:tree
是一个可以帮助您的好工具。
关于java.lang.NoSuchMethodError : org. apache.xml.security.transforms.Transform.init()V,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46485860/
正如标题中所问,我有两个如下结构的 XML 文件 A.xml //here I want to include B.xml
我有一个 xml 文件。根据我的要求,我需要更新空标签,例如我需要更改 to .是否可以像那样更改标签.. 谢谢... 最佳答案 var xmlString=" "; var properStri
我有这样简单的 XML: Song Playing 09:41:18 Frederic Delius Violin Son
在我的工作中,我们有自己的 XML 类来构建 DOM,但我不确定应该如何处理连续的空格? 例如 Hello World 当它被读入 DOM 时,文本节点应该包含 Hello 和 World
我有以下 2 个 xml 文件,我必须通过比较 wd:Task_Name_ID 和 TaskID 的 XML 文件 2。 例如,Main XML File-1 wd:Task_Name_ID 具有以下
我在 Rails 应用程序中有一个 XML View ,需要从另一个文件插入 XML 以进行测试。 我想说“构建器,只需盲目地填充这个字符串,因为它已经是 xml”,但我在文档中看不到这样做的任何内容
我正在重建一些 XML 提要,因此我正在研究何时使用元素以及何时使用带有 XML 的属性。 一些网站说“数据在元素中,元数据在属性中。” 那么,两者有什么区别呢? 让我们以 W3Schools 为例:
在同一个文档中有两个 XML 声明是否是格式正确的 XML? hello 我相信不是,但是我找不到支持我的消息来源。 来自 Extensible Markup Language
我需要在包装器 XML 文档中嵌入任意(语法上有效的)XML 文档。嵌入式文档被视为纯文本,在解析包装文档时不需要可解析。 我知道“CDATA trick”,但如果内部 XML 文档本身包含 CDAT
XML 解析器和 XML 处理器是两个不同的东西吗?他们是两个不同的工作吗? 最佳答案 XML 解析器和 XML 处理器是一样的。它不适用于其他语言。 XML 是通用数据标记语言。解析 XML 文件已
我使用这个 perl 代码从一个文件中读取 XML,然后写入另一个文件(我的完整脚本有添加属性的代码): #!usr/bin/perl -w use strict; use XML::DOM; use
我正在编写一个我了解有限的历史脚本。 对象 A 的类型为 system.xml.xmlelement,我需要将其转换为类型 system.xml.xmldocument 以与对象 B 进行比较(类型
我有以下两个 XML 文件: 文件1 101 102 103 501 502 503
我有以下两个 XML 文件: 文件1 101 102 103 501 502 503
我有一个案例,其中一个 xml 作为输入,另一个 xml 作为输出:我可以选择使用 XSL 和通过 JAXB 进行 Unmarshalling 编码。性能方面,有什么真正的区别吗? 最佳答案 首先,程
我有包含 XML 的 XML,我想使用 JAXB 解析它 qwqweqwezxcasdasd eee 解析器 public static NotificationRequest parse(Strin
xml: mario de2f15d014d40b93578d255e6221fd60 Mario F 23 maria maria
尝试更新 xml 文件数组时出现以下错误。 代码片段: File dir = new File("c:\\XML"); File[] files = dir.listFiles(new Filenam
我怎样才能完成这样的事情: PS /home/nicholas/powershell> PS /home/nicholas/powershell> $date=(Get-Date | ConvertT
我在从 xml 文件中删除节点时遇到一些困难。我发现很多其他人通过各种方式在 powershell 中执行此操作的示例,下面的代码似乎与我见过的许多其他示例相同,但我没有得到所需的行为。 我的目标是将
我是一名优秀的程序员,十分优秀!