spring-guides/tut-spring-boot-kotlin

No default constructor for entity: : blog.Article

EwanValentine opened this issue · 5 comments

I've followed this article word for word pretty much, and used this repository as a guide. However, I'm seeing the following error:

2019-02-26 00:37:25.687 ERROR 73030 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: No default constructor for entity:  : blog.Article; nested exception is org.hibernate.InstantiationException: No default constructor for entity:  : blog.Article] with root cause

org.hibernate.InstantiationException: No default constructor for entity:  : blog.Article

I've read online about a missing noarg plugin, but that's defined in my pom.xml. I'm fairly new to the Java ecosystem, so I could well be missing something obvious.

Thanks in advance!

Hey, could you describe when do you see this error? I have check the repo and tests are green with both Maven or Gradle so I would need additional info to reproduce.

Oh I may have spot an error in the configuration generated by start.spring.io, working on that.

I raised spring-io/initializr#863, I will update the tuto asap fixed on start.spring.io side.

Fix on start.spring.io side via spring-io/initializr#868 and I updated the tuto accordingly, thanks a lot for catching this and thanks to @snicoll for his help.

Awesome work all! I'll give it another go :) Cheers!