Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#188 fix auto-configuration loading in Spring Boot 3 #189

Merged
merged 2 commits into from
May 8, 2023

Conversation

kwonglau
Copy link
Contributor

No description provided.

}

dependencies {
compile "com.jayway.restassured:rest-assured:2.9.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't download this anymore

@@ -57,7 +57,7 @@ include 'eventuate-tram-micronaut-commands'
include 'eventuate-tram-test-util'
include "eventuate-tram-testing-support"
include "eventuate-tram-spring-testing-support-cloud-contract"
include "eventuate-tram-aggregate-domain-events"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this module is not used anywhere

@kwonglau
Copy link
Contributor Author

all tests are passing except build-and-test-all-postgres-wal-rabbitmq.sh. same thing happens even on master branch

the CDC failed to start.

#######
#        #    #  ######  #    #   #####  #    #    ##     #####  ######
#        #    #  #       ##   #     #    #    #   #  #      #    #
#####    #    #  #####   # #  #     #    #    #  #    #     #    #####
#        #    #  #       #  # #     #    #    #  ######     #    #
#         #  #   #       #   ##     #    #    #  #    #     #    #
#######    ##    ######  #    #     #     ####   #    #     #    ######

2023-01-16 00:57:28.941  INFO 1 --- [           main] i.e.cdc.main.EventuateCdcServiceMain     : Starting EventuateCdcServiceMain using Java 17.0.1 on b6c9f3d9b1f0 with PID 1 (/eventuate-cdc-service-0.15.0-SNAPSHOT.jar started by root in /)
2023-01-16 00:57:28.947  INFO 1 --- [           main] i.e.cdc.main.EventuateCdcServiceMain     : The following 3 profiles are active: "PostgresWal", "RabbitMQ", "postgres"
2023-01-16 00:57:31.034  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-01-16 00:57:31.045  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-01-16 00:57:31.045  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.65]
2023-01-16 00:57:31.140  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-01-16 00:57:31.140  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2110 ms
2023-01-16 00:57:32.416  WARN 1 --- [           main] o.a.c.retry.ExponentialBackoffRetry      : maxRetries too large (2147483647). Pinning to 29
2023-01-16 00:57:32.559  INFO 1 --- [           main] o.a.c.f.imps.CuratorFrameworkImpl        : Starting
2023-01-16 00:57:32.568  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2023-01-16 00:57:32.568  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=b6c9f3d9b1f0
2023-01-16 00:57:32.568  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=17.0.1
2023-01-16 00:57:32.568  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Amazon.com Inc.
2023-01-16 00:57:32.569  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=/usr/lib/jvm/java-17-amazon-corretto
2023-01-16 00:57:32.569  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=eventuate-cdc-service-0.15.0-SNAPSHOT.jar
2023-01-16 00:57:32.569  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2023-01-16 00:57:32.569  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=/tmp
2023-01-16 00:57:32.569  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Linux
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=5.15.49-linuxkit
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=root
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=/root
2023-01-16 00:57:32.570  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=/
2023-01-16 00:57:32.572  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=zookeeper:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@5fe8b721
2023-01-16 00:57:32.595  INFO 1 --- [1_default:2181)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server eventuate-tram-core-1_zookeeper_1.eventuate-tram-core-1_default/192.168.48.3:2181. Will not attempt to authenticate using SASL (unknown error)
2023-01-16 00:57:32.603  INFO 1 --- [1_default:2181)] org.apache.zookeeper.ClientCnxn          : Socket connection established to eventuate-tram-core-1_zookeeper_1.eventuate-tram-core-1_default/192.168.48.3:2181, initiating session
2023-01-16 00:57:32.639  INFO 1 --- [1_default:2181)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server eventuate-tram-core-1_zookeeper_1.eventuate-tram-core-1_default/192.168.48.3:2181, sessionid = 0x100002518740000, negotiated timeout = 40000
2023-01-16 00:57:32.657  INFO 1 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager     : State change: CONNECTED
2023-01-16 00:57:32.699  INFO 1 --- [           main] i.e.l.u.c.p.UnifiedCdcConfigurator       : Starting unified cdc pipelines
2023-01-16 00:57:32.709  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-01-16 00:57:32.839  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2023-01-16 00:57:32.861  INFO 1 --- [           main] i.e.l.postgres.wal.PostgresWalClient     : Adding binlog entry handler for schema = eventuate, table = message
2023-01-16 00:57:32.862  INFO 1 --- [           main] i.e.l.postgres.wal.PostgresWalClient     : Added binlog entry handler for schema = eventuate, table = message
2023-01-16 00:57:32.862  INFO 1 --- [           main] i.e.local.common.CdcDataPublisher        : Starting CdcDataPublisher
2023-01-16 00:57:32.898  INFO 1 --- [           main] i.e.m.r.s.p.EventuateRabbitMQProducer    : Creating channel/connection
2023-01-16 00:57:32.919 ERROR 1 --- [           main] i.e.m.r.s.p.EventuateRabbitMQProducer    : Creating channel/connection failed

java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
	at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:63) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:160) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1216) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1173) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:995) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at io.eventuate.messaging.rabbitmq.spring.producer.EventuateRabbitMQProducer.<init>(EventuateRabbitMQProducer.java:23) ~[eventuate-messaging-rabbitmq-spring-producer-0.15.0.BUILD-SNAPSHOT.jar!/:na]
	at io.eventuate.tram.cdc.connector.configuration.RabbitMQMessageTableChangesToDestinationsConfiguration.lambda$rabbitMQDataProducerFactory$1(RabbitMQMessageTableChangesToDestinationsConfiguration.java:25) ~[eventuate-tram-cdc-connector-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.common.CdcDataPublisher.start(CdcDataPublisher.java:73) ~[eventuate-local-java-cdc-connector-common-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.common.CdcPipeline.start(CdcPipeline.java:14) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.createStartSaveCdcDefaultPipeline(UnifiedCdcConfigurator.java:152) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.lambda$start$3(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at java.base/java.util.Optional.ifPresentOrElse(Optional.java:198) ~[na:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.start(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.initialize(UnifiedCdcConfigurator.java:81) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.22.jar!/:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar!/:5.3.22]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at io.eventuate.cdc.main.EventuateCdcServiceMain.main(EventuateCdcServiceMain.java:17) ~[classes!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]

2023-01-16 00:57:32.920  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unifiedCdcConfigurator': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
2023-01-16 00:57:32.921  INFO 1 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl        : backgroundOperationsLoop exiting
2023-01-16 00:57:32.931  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Session: 0x100002518740000 closed
2023-01-16 00:57:32.931  INFO 1 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn          : EventThread shut down
2023-01-16 00:57:32.941  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-01-16 00:57:32.965  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-01-16 00:57:32.991 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unifiedCdcConfigurator': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.22.jar!/:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar!/:5.3.22]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.6.11.jar!/:2.6.11]
	at io.eventuate.cdc.main.EventuateCdcServiceMain.main(EventuateCdcServiceMain.java:17) ~[classes!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
	at io.eventuate.messaging.rabbitmq.spring.producer.EventuateRabbitMQProducer.<init>(EventuateRabbitMQProducer.java:28) ~[eventuate-messaging-rabbitmq-spring-producer-0.15.0.BUILD-SNAPSHOT.jar!/:na]
	at io.eventuate.tram.cdc.connector.configuration.RabbitMQMessageTableChangesToDestinationsConfiguration.lambda$rabbitMQDataProducerFactory$1(RabbitMQMessageTableChangesToDestinationsConfiguration.java:25) ~[eventuate-tram-cdc-connector-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.common.CdcDataPublisher.start(CdcDataPublisher.java:73) ~[eventuate-local-java-cdc-connector-common-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.common.CdcPipeline.start(CdcPipeline.java:14) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.createStartSaveCdcDefaultPipeline(UnifiedCdcConfigurator.java:152) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.lambda$start$3(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at java.base/java.util.Optional.ifPresentOrElse(Optional.java:198) ~[na:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.start(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.initialize(UnifiedCdcConfigurator.java:81) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.22.jar!/:5.3.22]
	... 26 common frames omitted
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
	at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:63) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:160) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1216) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1173) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:995) ~[amqp-client-5.13.1.jar!/:5.13.1]
	at io.eventuate.messaging.rabbitmq.spring.producer.EventuateRabbitMQProducer.<init>(EventuateRabbitMQProducer.java:23) ~[eventuate-messaging-rabbitmq-spring-producer-0.15.0.BUILD-SNAPSHOT.jar!/:na]
	... 41 common frames omitted

@cer
Copy link
Contributor

cer commented Jan 16, 2023

all tests are passing except build-and-test-all-postgres-wal-rabbitmq.sh. same thing happens even on master branch

What type of machine are you using for development? ARM/M1 by any chance?

@cer
Copy link
Contributor

cer commented Jan 16, 2023

@kwonglau Great that you have made these changes.

I was going to ask you to add a simple build-and-test-all-mysql-kafka-spring-boot-3.sh script that verifies that Tram works with Spring Boot 3. It runs ./gradlew ... -P springBootVersion=3.... and is invoked by .circleci/config.yml.

But then it wasn't obvious what it should actually do. Perhaps run eventuate-tram-commands-db-broker-integration-test?
:-)

@kwonglau kwonglau force-pushed the wip-auto-configuration branch from e9d342b to d522bd6 Compare January 17, 2023 08:37
@kwonglau
Copy link
Contributor Author

@cer I'm using an intel chip mac. I just added a test per your suggestion and the tests are passing. :D

@kwonglau
Copy link
Contributor Author

I tried the latest rabbitmq image in the docker compose file

  rabbitmq:
    image: eventuateio/eventuate-rabbitmq:latest
    ports:
      - 5672:5672

and here is full stack trace

  2023-01-17 08:47:56.477  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unifiedCdcConfigurator': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
  2023-01-17 08:47:56.482  INFO 1 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl        : backgroundOperationsLoop exiting
  2023-01-17 08:47:56.501  INFO 1 --- [           main] org.apache.zookeeper.ZooKeeper           : Session: 0x10001e73be00000 closed
  2023-01-17 08:47:56.501  INFO 1 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn          : EventThread shut down
  2023-01-17 08:47:56.519  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2023-01-17 08:47:56.555  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 
  
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2023-01-17 08:47:56.614 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
  
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unifiedCdcConfigurator': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.6.11.jar!/:2.6.11]
        at io.eventuate.cdc.main.EventuateCdcServiceMain.main(EventuateCdcServiceMain.java:17) ~[classes!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[eventuate-cdc-service-0.15.0-SNAPSHOT.jar:na]
  Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
        at io.eventuate.messaging.rabbitmq.spring.producer.EventuateRabbitMQProducer.<init>(EventuateRabbitMQProducer.java:28) ~[eventuate-messaging-rabbitmq-spring-producer-0.15.0.BUILD-SNAPSHOT.jar!/:na]
        at io.eventuate.tram.cdc.connector.configuration.RabbitMQMessageTableChangesToDestinationsConfiguration.lambda$rabbitMQDataProducerFactory$1(RabbitMQMessageTableChangesToDestinationsConfiguration.java:25) ~[eventuate-tram-cdc-connector-0.15.0-SNAPSHOT.jar!/:na]
        at io.eventuate.local.common.CdcDataPublisher.start(CdcDataPublisher.java:73) ~[eventuate-local-java-cdc-connector-common-0.15.0-SNAPSHOT.jar!/:na]
        at io.eventuate.local.unified.cdc.pipeline.common.CdcPipeline.start(CdcPipeline.java:14) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.createStartSaveCdcDefaultPipeline(UnifiedCdcConfigurator.java:152) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.lambda$start$3(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at java.base/java.util.Optional.ifPresentOrElse(Optional.java:198) ~[na:na]
        at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.start(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.initialize(UnifiedCdcConfigurator.java:81) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) ~[spring-beans-5.3.22.jar!/:5.3.22]
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ~[spring-beans-5.3.22.jar!/:5.3.22]
        ... 26 common frames omitted
  Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
        at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
        at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:63) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:160) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1216) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1173) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:995) ~[amqp-client-5.13.1.jar!/:5.13.1]
        at io.eventuate.messaging.rabbitmq.spring.producer.EventuateRabbitMQProducer.<init>(EventuateRabbitMQProducer.java:23) ~[eventuate-messaging-rabbitmq-spring-producer-0.15.0.BUILD-SNAPSHOT.jar!/:na]
        ... 41 common frames omitted

I checked the cdc source code, but I can't tell what is missing

at io.eventuate.local.unified.cdc.pipeline.UnifiedCdcConfigurator.lambda$start$3(UnifiedCdcConfigurator.java:97) ~[eventuate-local-java-cdc-connector-unified-0.15.0-SNAPSHOT.jar!/:na]
        at java.base/java.util.Optional.ifPresentOrElse(Optional.java:198) ~[na:na]

@romaolucas
Copy link

hey @kwonglau do you have a plan to merge this PR or are you waiting further instructions regarding the upgrade process? we are upgrading our spring version but would need to have the updated eventuate

@cer
Copy link
Contributor

cer commented May 3, 2023

Sorry for the delay in merging those PRs.
I plan to start the merge within the next week.

@kwonglau
Copy link
Contributor Author

kwonglau commented May 3, 2023

there is nothing pending on my end. @romaolucas

thanks @cer

@cer cer merged commit 3ffef68 into eventuate-tram:master May 8, 2023
@rafaela-escobar
Copy link

Hi @cer, do you have an idea when a new version will be released with this fix?
As @romaolucas said we're upgrading our spring version but we are blocked waiting for eventuate new release.

@cer
Copy link
Contributor

cer commented May 20, 2023

Hi @cer, do you have an idea when a new version will be released with this fix? As @romaolucas said we're upgrading our spring version but we are blocked waiting for eventuate new release.

@rafaela-escobar @romaolucas sorry for the delay

Today, I fixed what I believe are the remaining issues.

Specifically, https://github.com/eventuate-tram/eventuate-tram-sagas-examples-customers-and-orders/tree/wip-spring-boot-3 is working except for eventuate-tram/eventuate-tram-sagas-examples-customers-and-orders#64 (Swagger UI is returning 404).

Is there any chance you could try out the BUILD-SNAPSHOTS with your application?

@kaiocezar
Copy link

@cer
How can I place the snapshot in my project?
I tried pointing to 0.32.0-SNAPSHOTS but gragle couldn't import it.

@cer
Copy link
Contributor

cer commented May 25, 2023

What's published are x.y.z.BUILD-SNAPSHOTs

Maven repository: https://snapshots.repositories.eventuate.io/repository

See https://github.com/eventuate-tram/eventuate-tram-sagas-examples-customers-and-orders/blob/wip-spring-boot-3/gradle.properties

@cer
Copy link
Contributor

cer commented May 27, 2023

@kaiocezar how is it going?

@kaiocezar
Copy link

Hi @cer , sorry for the delay,
After that I update version, when try to execute the operation, the request return a error.
error

@kaiocezar
Copy link

As I skipped the version from 29 to 33, I believe I'm missing a column in the message, I'll do it now and test it here.

@cer
Copy link
Contributor

cer commented Jun 30, 2023

As I skipped the version from 29 to 33, I believe I'm missing a column in the message, I'll do it now and test it here.

@kaiocezar Time has flown. How is it going with Spring Boot 3?

@BobMakhlin
Copy link

BobMakhlin commented Aug 4, 2023

Hi, @cer! I don't see x.y.z.BUILD-SNAPSHOTs in the maven repository (for instance, eventuate-tram-consumer-jdbc), maven cannot import them. When can we expect to have 0.33.0-RELEASE? Is there any workaround for now? Thanks.

@cer
Copy link
Contributor

cer commented Sep 1, 2023

Hi, @cer! I don't see x.y.z.BUILD-SNAPSHOTs in the maven repository (for instance, eventuate-tram-consumer-jdbc), maven cannot import them. When can we expect to have 0.33.0-RELEASE? Is there any workaround for now? Thanks.

SNAPSHOTS are published to https://snapshots.repositories.eventuate.io/repository

However, we've released a version of Eventuate that supports Spring 3 (and Spring Boot 2): eventuatePlatformVersion=2023.1.RELEASE

See example gradle.properties

@kaiocezar @BobMakhlin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants