title: Implementing EntityManager Compile errors
body: <p>I'm working on creating an AuditableEntityManager that puts a json message into a JMS queue routed to an ELK cluster for audit purposes.  </p>
  
  <p>Most of the implementations is just pass through, so for instance I have</p>
  
  <pre><code>EntityManager entityManager_ = null;
  
  public AuditableEntityManagerImpl(String name, 
                                  PersistenceProperty [] properties, 
                                  SynchronizationType synchronization,
                                  PersistenceContextType type,
                                  String unitName)
  {
    //TODO - Figure out how to configure the rest of the properties
    entityManager_ = Persistence.createEntityManagerFactory(name).createEntityManager();
  }
  </code></pre>
  
  <p>And most methods look like</p>
  
  <pre><code>@Override
  public &lt;T&gt; T find(Class&lt;T&gt; entityClass, Object primaryKey)
  {
    return entityManager_.find(entityClass, primaryKey);
  }
  </code></pre>
  
  <p>With the exception of the mutable methods which have todo blocks where I'll put the auditing parser</p>
  
  <pre><code>@Override
  public void remove(Object entity)
  {
    entityManager_.remove(entity);
    //TODO - LOG to audit
  }
  </code></pre>
  
  <p>I allowed eclipse to populate the missing methods from the interface and in the IDE all is green.  When I try to build though (using maven) I get a pile of errors stating that much of the javax.peristence stuff can't be found and that many of the methods don't exist in EntityManager.  I've flushed my .m2/repository to make sure it wasn't something corrupt in there, but no luck.</p>
  
  <p>The error stack is below, apologies for the length.  Any ideas would be greatly appreciated.</p>
  
  <pre><code>[INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[6,25] cannot find symbol
    symbol:   class EntityGraph
    location: package javax.persistence
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[16,25] cannot find symbol
    symbol:   class StoredProcedureQuery
    location: package javax.persistence
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[17,25] cannot find symbol
    symbol:   class SynchronizationType
    location: package javax.persistence
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[20,34] cannot find symbol
    symbol:   class CriteriaDelete
    location: package javax.persistence.criteria
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[22,34] cannot find symbol
    symbol:   class CriteriaUpdate
    location: package javax.persistence.criteria
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[31,37] cannot find symbol
    symbol:   class SynchronizationType
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[194,28] cannot find symbol
    symbol:   class CriteriaUpdate
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[200,28] cannot find symbol
    symbol:   class CriteriaDelete
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[242,10] cannot find symbol
    symbol:   class StoredProcedureQuery
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[248,10] cannot find symbol
    symbol:   class StoredProcedureQuery
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[254,10] cannot find symbol
    symbol:   class StoredProcedureQuery
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[260,10] cannot find symbol
    symbol:   class StoredProcedureQuery
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[326,14] cannot find symbol
    symbol:   class EntityGraph
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[332,10] cannot find symbol
    symbol:   class EntityGraph
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[338,10] cannot find symbol
    symbol:   class EntityGraph
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[344,19] cannot find symbol
    symbol:   class EntityGraph
    location: class psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManager.java:[14,25] cannot find symbol
    symbol:   class SynchronizationType
    location: package javax.persistence
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManager.java:[24,3] cannot find symbol
    symbol:   class SynchronizationType
    location: @interface psu.edu.javaee.audit.producer.AuditableEntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManager.java:[24,49] cannot find symbol
    symbol:   variable SynchronizationType
    location: @interface psu.edu.javaee.audit.producer.AuditableEntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[200,16] createQuery(CriteriaDelete) in psu.edu.javaee.audit.producer.AuditableEntityManagerImpl cannot implement &lt;T&gt;createQuery(javax.persistence.criteria.CriteriaQuery&lt;T&gt;) in javax.persistence.EntityManager
    return type javax.persistence.Query is not compatible with javax.persistence.TypedQuery&lt;T&gt;
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[182,16] name clash: createQuery(java.lang.String) in psu.edu.javaee.audit.producer.AuditableEntityManagerImpl overrides a method whose erasure is the same as another method, yet neither overrides the other
    first method:  &lt;T&gt;createQuery(javax.persistence.criteria.CriteriaQuery&lt;T&gt;) in psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
    second method: createQuery(CriteriaDelete) in psu.edu.javaee.audit.producer.AuditableEntityManagerImpl
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[241,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[244,26] cannot find symbol
    symbol:   method createNamedStoredProcedureQuery(java.lang.String)
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[247,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[250,26] cannot find symbol
    symbol:   method createStoredProcedureQuery(java.lang.String)
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[253,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[256,26] cannot find symbol
    symbol:   method createStoredProcedureQuery(java.lang.String,java.lang.Class[])
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[259,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[262,26] cannot find symbol
    symbol:   method createStoredProcedureQuery(java.lang.String,java.lang.String[])
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[271,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[274,26] cannot find symbol
    symbol:   method isJoinedToTransaction()
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[325,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[328,26] cannot find symbol
    symbol:   method createEntityGraph(java.lang.Class&lt;T&gt;)
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[331,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[334,26] cannot find symbol
    symbol:   method createEntityGraph(java.lang.String)
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[337,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[340,26] cannot find symbol
    symbol:   method getEntityGraph(java.lang.String)
    location: variable entityManager_ of type javax.persistence.EntityManager
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[343,3] method does not override or implement a method from a supertype
  [ERROR] /home/shawn/git/auditable-entity-manager/auditable-entity-manager-common/src/main/java/psu/edu/javaee/audit/producer/AuditableEntityManagerImpl.java:[346,26] cannot find symbol
    symbol:   method getEntityGraphs(java.lang.Class&lt;T&gt;)
    location: variable entityManager_ of type javax.persistence.EntityManager
  </code></pre>