我已将企业安全模块安装到Anypoint Studio 5.4中。企业安全示例应用程序配置为在Mule 3.7.3上运行并进行了专业化,但是包含了lib文件夹中的所有jar,包括以下内容(似乎这些jar的1.5.1版本可用,但不是下载,我也找不到maven设置):
mule-module-security-encryption-1.2.1-SNAPSHOT.jar
mule-module-security-property-placeholder-1.2.1-SNAPSHOT.jar
mule-module-security-signature-1.2.1-SNAPSHOT.jar
当我尝试运行应用程序时,我收到以下错误(我附加了我的maven settings.xml和pom.xml文件):
ERROR 2016-01-11 17:58:30,971 [main]
org.mule.module.launcher.DefaultArchiveDeployer:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact +
+ 'anypoint-enterprise-security-example', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.DeploymentException: Failed to deploy artifact
[anypoint-enterprise-security-example]
at
org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:38) ~[mule-module-launcher-3.7.
3.jar:3.7.3]
at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:324) ~[mule-module-launche
r-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDepl oyer.java:345) ~[mule-module-launch
er-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArc hiveDeployer.java:163) ~[mule-modul
e-launcher-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArc hiveDeployer.java:268) ~[mule-modul
e-launcher-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DefaultArchiveDeployer.deployPackagedArtifact(DefaultArc hiveDeployer.java:83) ~[mule-module
-launcher-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DeploymentDirectoryWatcher.deployPackedApps(DeploymentDi rectoryWatcher.java:275) ~[mule-mod
ule-launcher-3.7.3.jar:3.7.3]
at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatc her.java:150) ~[mule-module-launche
r-3.7.3.jar:3.7.3]
at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:1 04) ~[mule-module-launcher-3.7.3.ja
r:3.7.3]
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:170) ~
[mule-module-launcher-3.7.3.jar:3.7.3]
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer. java:15) ~[tooling-support-3.7.3.ja
r:?]
Caused by: java.lang.NoClassDefFoundError:
org/mule/security/signature/xml/algorithms/DigestMethodAlgorithm
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_45]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[?:1.8.0_45]
at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[?:1.8.0_45]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java: 571) ~[spring-core-4.1.6.RELEASE.ja
r:4.1.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:488)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:501)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
~[spring-core-4.1.6.RELEASE.jar:4.1
.6.RELEASE]
...more
的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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mulesoft.security.examples</groupId>
<artifactId>encrypted-message-producer</artifactId>
<name>Encrypted Message Producer examples</name>
<version>1.2.1-SNAPSHOT</version>
<packaging>mule</packaging>
<properties>
<jdk.version>1.8</jdk.version>
</properties>
<dependencies>
<dependency>
<groupId>com.mulesoft.security</groupId>
<artifactId>mule-module-security-signature</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mulesoft.security</groupId>
<artifactId>mule-module-security-property-placeholder</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mulesoft.security</groupId>
<artifactId>mule-module-security-encryption</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mule.tools</groupId>
<artifactId>maven-mule-plugin</artifactId>
<version>1.9</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>false</copyToAppsDirectory>
<excludeMuleDependencies>true</excludeMuleDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
</plugins>
</build>
`
答案 0 :(得分:0)
在你的pom中,版本标签中的依赖项是$ {project.version},这意味着他将尝试下载此工件的版本1.2.1-SNAPSHOT。 在尝试我的电脑后,我看到他无法取得它。我尝试使用1.5.1版本,一切顺利。
尝试为您的pom中的所有安全模块设置版本1.5.1。 希望这会有所帮助。
此致
答案 1 :(得分:0)
发现错误。在Maven安装的settings.xml中,企业凭据的服务器ID与存储库的ID不匹配。它现在部署版本1.5.1。