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

SpringBoot 3.0.0-RC1 Native runtime error: Failed to create query for method public abstract CoroutineCrudRepository.count() #32975

Closed
ketronkowski opened this issue Nov 2, 2022 · 3 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@ketronkowski
Copy link

I have a Kotlin-based, Spring Boot, native application. When targeted at SpringBoot 3.0.0-M5 it compiles and runs (natively) without error. When targeted at SpringBoot 3.0.0-RC1 it gets the following runtime error

Failed to create query for method public abstract java.lang.Object org.springframework.data.repository.kotlin.CoroutineCrudRepository.count(kotlin.coroutines.Continuation); No property 'count' found for type 'Customer'

The application is located at https://github.com/ketronkowski/spring-kotlin-native

The data class and repository interface in the application are defined as

data class Customer(@Id val id: Int?, val name: String)

interface CustomerRepository : CoroutineCrudRepository<Customer, Int>

and have the following runtime hints class imported

class MyHints: RuntimeHintsRegistrar {

    override fun registerHints(hints: RuntimeHints, classLoader: ClassLoader?) {
        listOf(Customer::class.java, Array<Instant>::class.java, Array<ZonedDateTime>::class.java).forEach {
            hints.reflection().registerType(it, *MemberCategory.values())
        }
     }
}

The gradle command to reproduce the problem is ./gradlew nativeRun. Line 4 of build.gradle.kts contains the spring boot version number target.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 2, 2022
@jamesward
Copy link

I was able to reproduce this with graalvm-ce-java17-22.2.0 but with graalvm-ce-java17-22.3.0 everything worked.

@ketronkowski
Copy link
Author

Ah, that is it. I confirmed that it is working with the new GraalVM release.

Sorry I did not try that new release of GraalVM first.

@scottfrederick scottfrederick closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2022
@scottfrederick scottfrederick added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 2, 2022
@scottfrederick
Copy link
Contributor

We have issue #32924 to try to make these GrallVm compatibility problems easier to diagnose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants