Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

使用默认的dubbo 2.5.4时候的注意事项 #1

Closed
syhily opened this issue Jul 7, 2015 · 4 comments
Closed

使用默认的dubbo 2.5.4时候的注意事项 #1

syhily opened this issue Jul 7, 2015 · 4 comments
Labels

Comments

@syhily
Copy link

syhily commented Jul 7, 2015

需要添加guava,需要dubbo排除spring

<?xml version="1.0" encoding="UTF-8"?>
<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.handu.open</groupId>
    <artifactId>dubbo-monitor</artifactId>
    <version>1.0.0</version>
    <packaging>war</packaging>

    <name>Dubbo Monitor</name>
    <description>Monitor module of dubbo project</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <dubbo.version>2.5.4</dubbo.version>
        <spring.version>4.1.6.RELEASE</spring.version>
        <zookeeper.version>3.4.6</zookeeper.version>
        <zkclient.version>0.1</zkclient.version>
        <curator.version>2.5.0</curator.version>
        <servlet.version>2.5</servlet.version>
        <jetbrick-template.version>2.0.10</jetbrick-template.version>
        <mybatis.version>3.2.7</mybatis.version>
        <mybatis-spring.version>1.2.2</mybatis-spring.version>
        <mysql.version>5.1.30</mysql.version>
        <druid.version>1.0.14</druid.version>
        <jackson.version>2.3.3</jackson.version>
        <junit.version>4.11</junit.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <version>${dubbo.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-servlet-api_3.1_spec</artifactId>
                    <groupId>org.jboss.spec.javax.servlet</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>tomcat-embed-core</artifactId>
                    <groupId>org.apache.tomcat.embed</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>tomcat-embed-logging-juli</artifactId>
                    <groupId>org.apache.tomcat.embed</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>javax.servlet-api</artifactId>
                    <groupId>javax.servlet</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>httpclient</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>httpcore</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>validation-api</artifactId>
                    <groupId>javax.validation</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-pool</artifactId>
                    <groupId>commons-pool</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-netty</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-jaxrs</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jaxrs-api</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-annotations-api_1.1_spec</artifactId>
                    <groupId>org.jboss.spec.javax.annotation</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>activation</artifactId>
                    <groupId>javax.activation</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-codec</artifactId>
                    <groupId>commons-codec</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-io</artifactId>
                    <groupId>commons-io</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jcip-annotations</artifactId>
                    <groupId>net.jcip</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-jdk-http</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-undertow</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-client</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>async-http-servlet-3.0</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>undertow-servlet</artifactId>
                    <groupId>io.undertow</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-annotations-api_1.2_spec</artifactId>
                    <groupId>org.jboss.spec.javax.annotation</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>undertow-core</artifactId>
                    <groupId>io.undertow</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jboss-logging</artifactId>
                    <groupId>org.jboss.logging</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xnio-api</artifactId>
                    <groupId>org.jboss.xnio</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xnio-nio</artifactId>
                    <groupId>org.jboss.xnio</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-jackson-provider</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-core-asl</artifactId>
                    <groupId>org.codehaus.jackson</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-mapper-asl</artifactId>
                    <groupId>org.codehaus.jackson</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-jaxrs</artifactId>
                    <groupId>org.codehaus.jackson</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-xc</artifactId>
                    <groupId>org.codehaus.jackson</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>resteasy-jaxb-provider</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jaxb-impl</artifactId>
                    <groupId>com.sun.xml.bind</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jaxb-core</artifactId>
                    <groupId>com.sun.xml.bind</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jaxb-api</artifactId>
                    <groupId>javax.xml.bind</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>istack-commons-runtime</artifactId>
                    <groupId>com.sun.istack</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>FastInfoset</artifactId>
                    <groupId>com.sun.xml.fastinfoset</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jsr173_api</artifactId>
                    <groupId>javax.xml.bind</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-databind</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-annotations</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-annotations</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-core</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
            <version>${zookeeper.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.sgroschupf</groupId>
            <artifactId>zkclient</artifactId>
            <version>${zkclient.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- Jetbrick Template Engineer -->
        <dependency>
            <groupId>com.github.subchen</groupId>
            <artifactId>jetbrick-template-springmvc</artifactId>
            <version>${jetbrick-template.version}</version>
        </dependency>
        <!-- MyBatis -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>${mybatis.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>${mybatis-spring.version}</version>
        </dependency>
        <!-- MySQL JDBC Driver -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.version}</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>${druid.version}</version>
        </dependency>
        <!-- Spring Data Support -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>dubbo-monitor</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <path>/${project.build.finalName}</path>
                    <uriEncoding>UTF-8</uriEncoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
@majinkai majinkai added the bug label Jul 10, 2015
@majinkai
Copy link
Member

我用一个干净的虚拟机,重新构建,因为本地dubbox做过小的修改,导致出现编译问题,现在已经修复好了

@licoco
Copy link

licoco commented Aug 28, 2015

我也发现这个问题,最新版本代码用2.5.4也需要添加guava,用spring3.X编译错误,spring4.X war运行时错误。。郁闷

@songzhongkai
Copy link

我刚也碰到了,最好把StringUtils换成 org.apache.commons.lang3.StringUtils

   <dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.3.2</version>
   </dependency>

@syhily
Copy link
Author

syhily commented Aug 28, 2015

@songzhongkai common-lang3 明显要好,23333。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants