0

So I am working on a RESTful API service and I got the following error:

could not read a hi value - you need to populate the table: confirmation_token_sequence

So after a quick google session I found out this should be the solution to my problem:

spring.jpa.hibernate.ddl-auto=create-drop

The problem is that I am using Gradle, and not Maven. So I know that in a Maven project that line of code should go into the pom.xml file and the Gradle variant of pom.xml is build.gradle, but I have no clue where and if it should go into the build.gradle file. Can anyone help me with my answer?

Thanks!!

3
  • What is giving that error? Your build? Or do you get it at runtime? And what does maven make of that "solution" line? Does it set some system property? You should be able to find this info where you found the solution. Commented Mar 3, 2021 at 10:54
  • @ernest_k I get the error when I send a post request via postman. I use Gradle, not maven. If I had used maven I would got the solution (posted it in my post) Commented Mar 3, 2021 at 11:10
  • Well, I suggest you read a little more on how that solution applies. You're getting an error at runtime, which means that your build tool has nothing to do with it. It could be that a hibernate-aware maven plugin is setting properties for you, but this is something that you'd be advised to understand in terms of how your framework expects and uses it. Commented Mar 3, 2021 at 11:13

1 Answer 1

2

The property

spring.jpa.hibernate.ddl-auto=create-drop 

should go in the application configuration file [ application.properties or application.yaml] and not the build file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.