question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to start Spring Boot(3.0.0-M5) application using jasync-r2dbc-mysql(2.1.1)

See original GitHub issue

Steps to reproduce:

Please checkout from repo https://github.com/JohnNiang/jasync-mysql-reprod to reproduce.

Version

https://github.com/jasync-sql/jasync-sql/releases/tag/2.1.1.

Log details

022-09-26T14:44:02.791+08:00  INFO 28128 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-09-26T14:44:02.806+08:00 ERROR 28128 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r2dbcScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/R2dbcInitializationConfiguration.class]: reactor/core/publisher/MonoExtensionsKt
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:931) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:442) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1323) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at run.halo.app.Application.main(Application.java:24) ~[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.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.0.0-M5.jar:3.0.0-M5]
Caused by: java.lang.NoClassDefFoundError: reactor/core/publisher/MonoExtensionsKt
	at com.github.jasync.r2dbc.mysql.JasyncConnectionFactory.create$lambda-1(JasyncConnectionFactory.kt:14) ~[jasync-r2dbc-mysql-2.1.1.jar:na]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4379) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:258) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:78) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8515) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8636) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8481) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8405) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.pool.SimpleDequePool.drainLoop(SimpleDequePool.java:451) ~[reactor-pool-1.0.0-M6.jar:1.0.0-M6]
	at reactor.pool.SimpleDequePool.pendingOffer(SimpleDequePool.java:598) ~[reactor-pool-1.0.0-M6.jar:1.0.0-M6]
	at reactor.pool.SimpleDequePool.doAcquire(SimpleDequePool.java:294) ~[reactor-pool-1.0.0-M6.jar:1.0.0-M6]
	at reactor.pool.AbstractPool$Borrower.request(AbstractPool.java:430) ~[reactor-pool-1.0.0-M6.jar:1.0.0-M6]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.request(FluxOnAssembly.java:649) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.request(FluxOnAssembly.java:649) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2339) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2213) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onSubscribe(FluxOnAssembly.java:633) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onSubscribe(FluxOnAssembly.java:633) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.pool.SimpleDequePool$QueueBorrowerMono.subscribe(SimpleDequePool.java:716) ~[reactor-pool-1.0.0-M6.jar:1.0.0-M6]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxRetry$RetrySubscriber.resubscribe(FluxRetry.java:117) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoRetry.subscribeOrReturn(MonoRetry.java:50) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4364) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:544) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:180) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:544) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:142) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:544) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:544) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Operators.error(Operators.java:198) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoError.subscribe(MonoError.java:53) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:55) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4379) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.MonoUsingWhen.subscribe(MonoUsingWhen.java:96) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4379) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at reactor.core.publisher.Mono.block(Mono.java:1674) ~[reactor-core-3.5.0-M6.jar:3.5.0-M6]
	at org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializer.runScripts(R2dbcScriptDatabaseInitializer.java:71) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.runScripts(AbstractScriptDatabaseInitializer.java:145) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applyScripts(AbstractScriptDatabaseInitializer.java:107) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.applySchemaScripts(AbstractScriptDatabaseInitializer.java:97) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.initializeDatabase(AbstractScriptDatabaseInitializer.java:75) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer.afterPropertiesSet(AbstractScriptDatabaseInitializer.java:65) ~[spring-boot-3.0.0-M5.jar:3.0.0-M5]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1750) ~[spring-beans-6.0.0-M6.jar:6.0.0-M6]
	... 21 common frames omitted
Caused by: java.lang.ClassNotFoundException: reactor.core.publisher.MonoExtensionsKt
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
	... 72 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:44143', transport: 'socket'

Process finished with exit code 0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
oshaicommented, Oct 5, 2022

So after some more tests I released version 2.1.5 which fixes some more issues. I finally made it to work with local mysql

$ ./gradlew bootRun

> Task :bootRun

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::             (v3.0.0-M5)

2022-10-05T17:33:29.616+03:00  INFO 94015 --- [           main] c.h.j.JasyncMysqlReprodApplication       : Starting JasyncMysqlReprodApplication using Java 17.0.4.1 on oshai-macbookpro.roam.corp.google.com with PID 94015 (/Users/oshai/workspace/jasync-mysql-reprod/build/classes/java/main started by oshai in /Users/oshai/workspace/jasync-mysql-reprod)
2022-10-05T17:33:29.618+03:00  INFO 94015 --- [           main] c.h.j.JasyncMysqlReprodApplication       : No active profile set, falling back to 1 default profile: "default"
2022-10-05T17:33:29.853+03:00  INFO 94015 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data R2DBC repositories in DEFAULT mode.
2022-10-05T17:33:29.861+03:00  INFO 94015 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 R2DBC repository interfaces.
2022-10-05T17:33:30.065+03:00  INFO 94015 --- [           main] c.g.j.r.m.MysqlConnectionFactoryProvider : set jasync.mysql.CLIENT_FOUND_ROWS=true
2022-10-05T17:33:30.116+03:00  INFO 94015 --- [           main] c.github.jasync.sql.db.util.NettyUtils   : jasync selected transport - nio
2022-10-05T17:33:30.500+03:00  INFO 94015 --- [           main] c.h.j.JasyncMysqlReprodApplication       : Started JasyncMysqlReprodApplication in 1.307 seconds (process running for 1.525)

BUILD SUCCESSFUL in 2s
4 actionable tasks: 3 executed, 1 up-to-date

Note that I also got an error: A table must have 1 Column and fixed it by changing the init sql to one line (not sure why multiple lines don’t work).

So please try it with jasync 2.1.5.

0reactions
JohnNiangcommented, Oct 6, 2022

The latest release(2.1.5) works fine for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SpringBoot Application fails startup when adding dependency
You're using different versions of spring-boot-starter-parent (2.3.1. ... In your application pom.xml remove the explicit dependency from
Read more >
Native Support in Spring Boot 3.0.0-M5
If the application builds successfully but fails to start, it is likely that some reachability metadata is missing. The need for it can...
Read more >
Preparing for Spring Boot 3.0
We are planning to release Spring Boot 3.0 in November 2022. This next major revision will be based on Spring Framework 6.0 and...
Read more >
Getting Started - Spring
Spring Boot 3.0.0 requires Java 17 and is compatible up to and including ... The first run of your application is slow, as...
Read more >
Spring Boot Reference Documentation
Spring Boot 3.0.0 requires Java 17 and is compatible up to and including Java 19. ... run a web application twice, you see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found