etsy / statsd-jvm-profiler

Simple JVM Profiler Using StatsD and Other Metrics Backends
MIT License
330 stars 93 forks source link

Old dependencies #50

Open SercanKaraoglu opened 6 years ago

SercanKaraoglu commented 6 years ago

There is nice functionality "http server" which seems to be configurable, however that one brings vertx's old version as a dependency which causes old version of fasterxml and netty to appear in the classpath byproduct. When I run spring boot 2 with the agent it also has netty and fasterxml dependencies, as you can predict this causes conflicts and here it throws verify error https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java#L742

I would propose to use simpler httpserver there which brings no dependencies byproduct.

PandaMonkey commented 6 years ago

Hi, @SercanKaraoglu , the conflicting problem is that statsd-jvm-profiler uses fasterxml 2.8.10 and spring depends on fasterxml 2.9.3. To prevent the classpath issue, you should guarantee that client project actually uses fasterxml 2.9.3. Adding the following patch in pom.xml file may help you solve the problem:

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.9.3</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.9.3</version>
    </dependency>

Hope this can help you. ^_^

SercanKaraoglu commented 6 years ago

Thanks for response @PandaMonkey, yeah that also works, instead I removed vertx completely because actually I don't need server at all, I am importing metrics to influx