GeoIP2与Glassfish。可能吗?

时间:2013-10-20 01:42:19

标签: glassfish geoip java-ee-7

是否可以将GeoIP2与Glassfish服务器一起使用?我将maven用于GeoIP2

<dependency>
    <groupId>com.maxmind.geoip2</groupId>
    <artifactId>geoip2</artifactId>
    <version>0.5.0</version>
</dependency>

我收到以下错误:

SEVERE:   Exception while loading the app
SEVERE:   Undeployment failed for context 
SEVERE:   Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)]"

当我尝试部署应用时。

UPDATE 我不得不添加这个

 <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>15.0</version>
 </dependency>

1 个答案:

答案 0 :(得分:1)

我不确定,但这看起来像Google番石榴lib的问题(看看here)。

您要部署到GlassFish 4吗?如果是这样,您可以尝试在GlassFish 3上部署您的应用程序,看看是否有帮助。

您还可以尝试以下列方式排除番石榴lib:

    <dependency>
        <groupId>com.maxmind.geoip2</groupId>
        <artifactId>geoip2</artifactId>
        <version>0.5.0</version>
        <exclusions>
            <exclusion>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
            </exclusion>
        </exclusions>    
    </dependency>
相关问题