I have the following maven build profile:

    <profile>
        <id>runMule</id>
        <activation>
            <property>
                <name>runMule</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <configuration>
                        <executable>java</executable>
                        <arguments>
                            <argument>-classpath</argument>
                            <classpath/>
                            <argument>org.mule.MuleServer</argument>
                            <argument>-config</argument>
                            <argument>mule-config.xml</argument>
                        </arguments>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

If I execute:

mvn exec:exec -DrunMule

I end with the following error:

[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ acceptance-tests ---
INFO  2012-02-16 17:01:48,170 [main] org.mule.MuleServer: Mule Server starting...
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.mule.MuleServer.shutdown(MuleServer.java:307)
at org.mule.MuleServer.run(MuleServer.java:211)
at org.mule.MuleServer.start(MuleServer.java:195)
at org.mule.MuleServer.main(MuleServer.java:166)
Caused by: java.lang.SecurityException: class "org.apache.commons.collections.ArrayStack"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:806)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)

My dependency list is:

<dependencies>
    <dependency>
        <groupId>org.mule</groupId>
        <artifactId>mule-core</artifactId>
        <version>1.4.2</version>
    </dependency>
    <dependency>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-spring</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-core</artifactId>
        <classifier>resources</classifier>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-core</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.xbean</groupId>
        <artifactId>xbean-spring</artifactId>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.6</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.6</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
    </dependency>
    <dependency>
        <groupId>net.sf.json-lib</groupId>
        <artifactId>json-lib</artifactId>
        <type>jar</type>
        <classifier>jdk15</classifier>
    </dependency>
    <dependency>
        <groupId>xom</groupId>
        <artifactId>xom</artifactId>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.3</version>
    </dependency>
</dependencies>

I think it is a maven dependency conflict, but I'm not sure.

Any idea what is causing the error?

有帮助吗?

解决方案

I agree, this looks like a dependency conflict. Do you have eclipse? If you do you can see the conflicts in the "Dependency hierarchy" tab of your pom. Here is a screenshot of my dependency hierarchy.

其他提示

Please be mindful of others :) You're already using maven, run 'mvn dependency:tree' and 'mvn dependency:list' to troubleshoot dependency issues, this way you can also post results here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top