https://kotlinlang.org logo
#server
Title
r

Raymond Boswel

11/12/2021, 10:30 AM
Hi everyone, I've recently joined a team using Ktor and Hibernate and Maven (and the maven-shade-plugin). At present the project cannot hot reload, which is something I'm trying to address. I've migrated the project to Gradle, but can only get hibernate to work if I use the gradle Shadow plugin. Unfortunately this plugin seems to be incompatible with hot reloading, since it bundles all the dependencies in a single jar, preventing ktor from detecting updates. Without the Shadow plugin, I get the following when an entity is accessed:
Copy code
org.hibernate.hql.internal.ast.QuerySyntaxException: Account is not mapped
Does anyone have an example project or suggestion of how hibernate can be used with Ktor?