Hello! I don't know what's going on, can anyone he...
# getting-started
t
Hello! I don't know what's going on, can anyone help me? I have this error:
Class 'Customer' should have [public, protected] no-arg constructor
. I have both plugins:
Copy code
plugins {
    kotlin("jvm") version "2.0.21"
    kotlin("plugin.spring") version "2.0.21"
    id("org.springframework.boot") version "3.3.5"
    id("io.spring.dependency-management") version "1.1.6"
    kotlin("plugin.jpa") version "2.0.21"
}
As far as I understand,
kotlin("plugin.jpa")
should contain the
compiler plugin with no arguments
, but maybe I'm wrong.
e
https://kotlinlang.org/docs/no-arg-plugin.html#jpa-support that applies to
@Entity
@Embeddable
and
@MappedSuperclass
annotated classes - is your
Customer
one of them?
t
Yes,
@Entity
e
hmm. where is this error coming from?
I don't see a way to easily debug the compiler plugin
however, if the code builds fine in Gradle, but the IDE shows error, then you're probably running into https://youtrack.jetbrains.com/issue/KTIJ-31154/K2-No-arg-JPA-compiler-plugin-seems-not-work-on-Kotlin-Plugin-K2-mode
t
Thanks for your help, I'll take a look at the issue