title: Problem with import javax.persistence.EntityManager;
body: <p>Hey I want to make projects using databases. I've found some tutorials on youtube, but I have problem with Java JPA/Hibernate. Even tho I am following each step I just cant get to import  in my class</p>
  <pre><code>import javax.persistence.EntityManage
  </code></pre>
  <p>I am using IntelliJ and here is how I am trying to do it.
  First I create maven project without archetypes.
  Then in my pom.xml file which for some reason looks different than the one in tutorial.</p>
  <p>I am adding dependencies.</p>
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;5.4.28.Final&lt;/version&gt;
         &lt;/dependency&gt;
  
    &lt;dependency&gt;
              &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;javax.persistence-api&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
    &lt;/dependency&gt;
  </code></pre>
  <p>The second one might not be needed, but I am trying everything at this point. At the end my pom.xml file looks like:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.example&lt;/groupId&gt;
      &lt;artifactId&gt;BD&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;15&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;15&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;1.4.197&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;5.4.28.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>In my pom file there are no errors.
  I have also made persistence.xml file, but the problem appears before it matters.
  I've spent few hours looking for solution and I am so angry at myself that I cant get over such a easy thing, but I have no idea what am I doing wrong. I literally follow tutorial that clearly works.</p>