Maka
Maka

Reputation: 357

Error trying to build a executable spring boot jar

I'm just trying to build a executable jar using Spring Boot, based on Joel example https://github.com/joeldudleyr3/spring-observable-stream, but I'm getting the following error:

exception is java.lang.NoSuchMethodError: org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration.getDefaultRoutingType()Lorg/apache/activemq/artemis/api/core/RoutingType;

at this line of code:

CordaRPCClient(rpcAddress).start(username, password)

Obs.: Invoking via JavaExec task it works perfectly.

Upvotes: 0

Views: 135

Answers (2)

Joel
Joel

Reputation: 23140

I fixed this by adding the following to my build.gradle file's dependencies block:

dependencies {

    ...

    compile "org.apache.activemq:artemis-commons:2.0.0"
    compile "org.apache.activemq:artemis-core-client:2.0.0"

    ...

}

Upvotes: 1

Kid101
Kid101

Reputation: 1470

It's a jar issue. which doesn't have this method. This method has been moved around look for this jar having package name as: org.apache.activemq.artemis. in client and common. not sure here but that's the culprit for you either go for version 1.X or 2.X just check which one has this method. force compile to version 2.X for both client and common in your gradle file you will be good to go.

Upvotes: 1

Related Questions