title: How to upgrade Hibernate from version 4.3 to 5.2 for migration to JDK 10?
body: <p>Since <code>JDK8 Oracle</code> announced that no longer support, I am required to upgrade the current <code>JDK</code> to <code>JDK10</code>. </p>
  
  <p>After study, the current <code>hibernate</code> is also required to upgrade from <code>hibernate 4</code> to <code>hibernate 5</code>, in order to run at <code>JDK 10.</code> </p>
  
  <p>However, there are some hibernate related libraries, should I also upgrade, if yes, which version that is suitable? Here is an extract of my current <code>pom.xml</code>:</p>
  
  <pre><code>&lt;properties&gt;
  &lt;hibernate.version&gt;4.3.11.Final&lt;/hibernate.version&gt;
  &lt;java-version&gt;1.7&lt;/java-version&gt;
  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;!-- hibernate --&gt;
  &lt;dependency&gt;
       &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;  
       &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
       &lt;version&gt;1.0.0.Final&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
       &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
       &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
       &lt;version&gt;${hibernate.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
       &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
       &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
       &lt;version&gt;5.1.2.Final&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>