CDI部署失败:WELD-001414:Bean名称不明确 - jar问题

时间:2016-01-23 21:10:48

标签: java jersey glassfish openstack

我开始使用OpenStack4j并且在开始时遇到问题。我在部署时遇到了这样的错误:

org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001414: Bean name is ambiguous. Name JerseyClassAnalyzer resolves to beans: [Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default @Named @Any], Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default @Named @Any]]
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:234)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)

我看过Jersey + Spring deployment failure on Glassfish : CDI issueCDI deployment failure:WELD-001414 Bean name is ambiguous 但是我正在使用Glassfish 4.1,除了OpenStack4j之外没有任何更多的依赖关系,我当然不能给<scope>provided</scope>这个依赖。

这是我的所有依赖:

<dependencies>
    <dependency>
        <groupId>org.pacesys</groupId>
        <artifactId>openstack4j</artifactId>
        <version>2.0.9</version>
        <classifier>withdeps</classifier>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20151123</version>
    </dependency>   
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>  
        <groupId>org.primefaces</groupId>  
        <artifactId>primefaces</artifactId>  
        <version>5.3</version>  
    </dependency>
</dependencies>

我将不胜感激。

0 个答案:

没有答案