My code compiles fine but when I try to run my Jar, I get the following error in the stack trace
java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.stream.config.codec.kryo.KryoCodecAutoConfiguration
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.stream.config.ChannelBindingAutoConfiguration] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@439f5b3d]
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/actuate/endpoint/AbstractEndpoint
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.endpoint.AbstractEndpoint
I have added actuator as a dependency in my pom.xml as well. Here are all the dependencies :
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
What am I missing? Can it be because of the spring boot version that I am using?
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
I also want to understand where this actuator is coming in the picture from, as I have just two classes in this dummy project.
package demo.example.jobIDProcessor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Processor;
import org.springframework.integration.annotation.Transformer;
@EnableBinding(Processor.class)
@SpringBootApplication
public class JobIDProcessorApplication {
@Transformer(inputChannel = Processor.INPUT, outputChannel = Processor.OUTPUT)
public String fetchJD(String jobID) {
return "ye raha JD of "+jobID;
}
public static void main(String[] args) {
SpringApplication.run(JobIDProcessorApplication.class, args);
}
}
and the following
package demo.example.jobIDProcessor;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Processor;
import org.springframework.integration.annotation.Transformer;
@EnableBinding(Processor.class)
public class JobIDProcessorConfig {
@Transformer(inputChannel = Processor.INPUT, outputChannel = Processor.OUTPUT)
public String fetchJD(String jobID) {
return "ye raha JD of "+jobID;
}
}
Where is this "org/springframework/boot/actuate/endpoint/AbstractEndpoint" being called from?