0
votes

my spring boot microservices run currently with Spring-Boot 2.2.9.RELEASE

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.9.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

I also still use

  • Spring-Cloud Hoxton.SR7
    • spring-cloud-starter-sleuth 2.2.4
    • spring-cloud-starter-zipkin 2.2.4
    • spring-boot-starter-data-rest 2.2.9
    • spring-boot-starter-quartz 2.2.9
    • spring-boot-configuration-processor 2.2.9
    • spring-boot-starter-web 2.2.9
    • spring-cloud-starter-netflix-eureka-client 2.2.4
    • spring-boot-starter-actuator 2.2.9
    • spring-boot-starter-data-jpa 2.2.9
  • PostgreSQL
  • Logstash 6.4
  • Logbook 2.1.4
  • Lombok 1.18.12

dependencies.

Now I wanted switch to Spring Boot 2.3.2.RELEASE. I can compile the code without any errors. After start the service I see this

INFO: HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

log message. There are now errors. And then the deployment process stopped. Nothing happens.

At the moment I have no idea why it's not running. Has someone some tip?

1
Whole console output pleaseJ Asgarov
@JAsgarov can you see something in the log?rafcio
not really, did the application crash? where is the crash message?J Asgarov
@JAsgarov this is my problem. There is no exception ... the Application is still running, but looks like "zombi" state. I try to evaluate this on weekend. thx!rafcio

1 Answers

0
votes

I think I found the problem.

@EnableEurekaClient
@EnableScheduling
@SpringBootApplication
@EnableAsync
public class AccountApplication {

    public static void main(String[] args) {
        SpringApplication.run(AccountApplication.class, args);
    }

    @Bean("threadPoolTaskExecutor")
    public Executor asyncExecutor() {
        final ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(20);
        executor.setMaxPoolSize(1000);
        executor.setThreadNamePrefix("AsyncThread-");
        executor.initialize();
        return executor;
    }

}

Than I used the Exceutor in my code:

   @Async("threadPoolTaskExecutor")
   public CompletableFuture<ServiceAccountDTO> registerAccountInService(final String uuid, final ServiceEnum serviceEnum,
                                                                             final Date creationDate, final Date realCreationDate) {
    ..
    }

With this configuration the service was not starting correctly.

Now the @Bean("threadPoolTaskExecutor") configuration is removed and I'm using only @Async.

But why it's not working with Spring Boot Starter 2.3.x? And there was no error message in the log.