Skip to content
Advertisement

“illegal character” error when using hibernate-jpamodelgen in Spring Boot

  <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-jpamodelgen</artifactId>
    <version>${hibernate.version}</version>
  </dependency>

When I add the above dependency and compile my project, I get an “illegal character” error for Turkish characters. My problem is same as here but I didn’t understand how to solve it in Spring Boot. I tried the solutions but they didn’t work.

error

I would be glad if you help.

Advertisement

Answer

Days later I tackled the issue again and finally resolved it. I have two different solutions for the following two different situations.

1) Using maven wrapper (mvnw)

  • Create .mvn/jvm.config file in the project.
  • Add the following options to file.
-Duser.language=en
-Duser.country=US

2) Using Intellij Idea

  • Add the same options above to the .vmoptions file described here.
  • Select File -> Invalidate Caches -> Invalidate and Restart
Advertisement