Jongo Maven依赖导致运行时问题

时间:2015-05-02 21:55:42

标签: maven jongo

我有一个Maven项目,我使用以下POM的Jongo依赖项。

<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.xxx</groupId>
    <artifactId>mytracker</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>mytracker</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>

    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>com.yammer.dropwizard</groupId>
            <artifactId>dropwizard-core</artifactId>
            <version>0.6.2</version>
        </dependency>
        <dependency>
            <groupId>net.vz.mongodb.jackson</groupId>
            <artifactId>mongo-jackson-mapper</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>org.jongo</groupId>
            <artifactId>jongo</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>org.joda</groupId>
            <artifactId>joda-money</artifactId>
            <version>0.10.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.jersey-test-framework</groupId>
            <artifactId>jersey-test-framework-core</artifactId>
            <version>1.19</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.19</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey.test.framework</groupId>
            <artifactId>jersey-test-framework</artifactId>
            <version>1.0.3.1</version>

        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
    </dependencies>

</project>

现在当我运行我的Main类时,我在eclipse中遇到以下错误,虽然使用Maven成功构建了项目,但是当我运行Main类时会出现此错误。我正在使用JDK 1.7,有什么想法吗?

Exception in thread "main" java.lang.VerifyError: (class: org/jongo/marshall/jackson/configuration/AbstractMappingBuilder, method: <init> signature: ()V) Incompatible argument to function
    at org.jongo.Jongo.<init>(Jongo.java:32)
    at com.mycompany.mytracker.CashbackService.run(CashbackService.java:44)
    at com.mycompany.mytracker.CashbackService.run(CashbackService.java:18)
    at com.yammer.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:38)
    at com.yammer.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:58)
    at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
    at com.yammer.dropwizard.Service.run(Service.java:61)
    at com.mycompany.mytracker.CashbackService.main(CashbackService.java:22)

0 个答案:

没有答案