title: package javax.persistence does not exist despite Netbeans adding the Eclipselink module
body: <p>Two part question:</p>
  
  <p>first part:  which JAR is required?  Does not javax.persistence-2.0.0.jar have the required classes, in particular javax.persistence.*?</p>
  
  <p><img src="https://i.stack.imgur.com/mzLt1.png" alt="enter image description here"></p>
  
  <p>stack trace as so:</p>
  
  <pre><code>init:
  deps-jar:
  Created dir: /home/thufir/NetBeansProjects/JavaApplication12/build
  Updating property file: /home/thufir/NetBeansProjects/JavaApplication12/build/built-jar.properties
  Created dir: /home/thufir/NetBeansProjects/JavaApplication12/build/classes
  Created dir: /home/thufir/NetBeansProjects/JavaApplication12/build/classes/META-INF
  Copying 1 file to /home/thufir/NetBeansProjects/JavaApplication12/build/classes/META-INF
  Created dir: /home/thufir/NetBeansProjects/JavaApplication12/build/empty
  Created dir: /home/thufir/NetBeansProjects/JavaApplication12/build/generated-sources/ap-source-output
  Compiling 2 source files to /home/thufir/NetBeansProjects/JavaApplication12/build/classes
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:8: error: package javax.persistence does not exist
  import javax.persistence.*;
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:15: error: cannot find symbol
  @Entity
    symbol: class Entity
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:16: error: cannot find symbol
  @Table(name = "fud30_groups", catalog = "fudforum", schema = "")
    symbol: class Table
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:18: error: cannot find symbol
  @NamedQueries({
    symbol: class NamedQueries
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:28: error: cannot find symbol
      @Id
    symbol:   class Id
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:29: error: cannot find symbol
      @GeneratedValue(strategy = GenerationType.IDENTITY)
    symbol:   class GeneratedValue
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:30: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:31: error: cannot find symbol
      @Column(name = "id")
    symbol:   class Column
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:33: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:34: error: cannot find symbol
      @Column(name = "name")
    symbol:   class Column
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:36: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:37: error: cannot find symbol
      @Column(name = "inherit_id")
    symbol:   class Column
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:39: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:40: error: cannot find symbol
      @Column(name = "forum_id")
    symbol:   class Column
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:42: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:43: error: cannot find symbol
      @Column(name = "groups_opt")
    symbol:   class Column
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:45: error: cannot find symbol
      @Basic(optional = false)
    symbol:   class Basic
    location: class Fud30Groups
  /home/thufir/NetBeansProjects/JavaApplication12/src/javaapplication12/Fud30Groups.java:46: error: cannot find symbol
      @Column(name = "groups_opti")
    symbol:   class Column
    location: class Fud30Groups
  18 errors
  /home/thufir/NetBeansProjects/JavaApplication12/nbproject/build-impl.xml:605: The following error occurred while executing this line:
  /home/thufir/NetBeansProjects/JavaApplication12/nbproject/build-impl.xml:246: Compile failed; see the compiler error output for details.
  BUILD FAILED (total time: 0 seconds)
  </code></pre>
  
  <p>Second part of the question is, what's (potentially) wrong with Netbeans?  Until yesterday, it seemed that the IDE would automagically add required classes to the classpath when, as here, generating an @Entity class from an existing database.  In this particular case, Netbeans did add JAR's.</p>
  
  <p>However, because they're added externally to the project there's no lib folder.  Unfortunately I'm not familiar enough yet to really dive into build.xml to see what's going on, but from the Library Manager it looks like they are as so:</p>
  
  <pre><code>thufir@dur:~$ tree netbeans-7.1.1/java/modules/ext/eclipselink/
  netbeans-7.1.1/java/modules/ext/eclipselink/
  ├── eclipselink-2.3.0.jar
  ├── eclipselink-jpa-modelgen-2.3.0.jar
  ├── javax.persistence-2.0.jar
  └── org.eclipse.persistence.jpa.jpql_1.0.0.jar
  
  0 directories, 4 files
  thufir@dur:~$ 
  </code></pre>
  
  <p>It just seems to not fit with my recollection that additional steps, downloading whichever JAR's are missing, was required in the past.  Could a setting in Netbeans be wrong or corrupted?</p>