asked    Rae     2018-07-06       spring       172 view        1 Answer

[SOLVED] Spring Boot fails to run maven-surefilre-plugin ClassNotFoundException org.apache.maven.surefire.booter.ForkedBooter

Running maven (3.5.2) build of a Spring Boot 2.0.2.RELEASE applicaton (generated by web initialiser with web dependencies) fails executing the maven-surefire-plugin saying just:

Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter

Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.ForkedBooter

Why is this happening? Is it a problem in boot + surefire integration = a bug?

For reference, the dependencies that seem relevant are:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.RELEASE</version>
    <relativePath/>
</parent>
...
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
</dependency>
<dependency>
        <groupId>org.unitils</groupId>
        <artifactId>unitils</artifactId>
        <version>2.2</version>
        <scope>test</scope>
</dependency>
...
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
</dependency>
...
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

  1 Answer  

        answered    Thomas     2018-07-06      

Workaround for the issue was to override Spring Boot's maven-surefire-plugin definition and set useSystemClassLoader to false. Read Surefire docs for more details

<build>
    <plugins>
        ...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <useSystemClassLoader>false</useSystemClassLoader>
            </configuration>
        </plugin>
    </plugins>
</build>




Your Answer





 2018-07-06         Cornelia

debugging imbalanced kafka message_in rate

I've a 4 node kafka cluster in my production where we are using custom partitioner which does mod 64 of an id to determine the partition. since last week, there has been imbalanced kafka messages_in rate on 1 of our nodes as can been seen in the graph attached. The pink line shows the message in rate on kafka01 node and bluish yellow line shows the message in rate on all other 3 boxes . I'm using datadog for monitoring and using the metric kafka.messages_in.rate . Assuming that there has been no change in the id distribution , there should have been no change in distributio...
 apache-kafka                     1 answers                     47 view
 2018-07-06         Ken

Does Datadog support graphs with 2 Y-axis with different scales?

Like this one:[If yes, how do I create one?From all documentation I've read so far, it doesn't seem to support it. But I don't see anyone confirming that it's not supported anywhere. Confirmed on IRC (#datadog on freenode) that: Datadog doesn't support multiple Y-axis at this time. [XXX]If the two axis have the same units but different degrees (10 vs 10 million), then using a non-linear scale such as log might provide what you need:https://help.datadoghq.com/hc/en-us/articles/203038729-Is-it-possible-to-adjust-the-y-axis-for-my-graphs- [XXX]
 plot                     2 answers                     49 view
 2018-07-06         Constance

Can we write an custom check for monitoring a process with Data Dog

I want to write an DataDog Check to monitor some process like Puma, delayed_job etc, I can see there are ready plugins available for these for nagios and Sensu but not for DataDog, But can I write my own check/plugin for this services in datadog ? or can I use existing Nagios/sensu plugins with DataDog ? If yes How should I proceed ? The easiest way to proceed is to create a custom check. You can read up on this here: http://docs.datadoghq.com/guides/agent_checks/. There isn't a way to take a pre-existing Nagios or Sensu plugin and have it work as is with Datadog, but lo...
 plugins                     1 answers                     50 view