title: GAE and JPA - java.lang.NoSuchMethodError: org.datanucleus.store.ExecutionContext.findObject
body: <p>I'm using Google app engine and JPA for my application.
  I need to call REST API to insert and get records.Insertion of the records to the table works fine,but when I use select query it is giving tons of error.</p>
  
  <p>Error Trace is :</p>
  
  <pre><code>java.lang.NoSuchMethodError: org.datanucleus.store.ExecutionContext.findObject(Ljava/lang/Object;Lorg/datanucleus/store/FieldValues;Ljava/lang/Class;Z)Ljava/lang/Object;
  at com.google.appengine.datanucleus.query.DatastoreQuery.entityToPojoPrimaryKey(DatastoreQuery.java:543)
  at com.google.appengine.datanucleus.query.DatastoreQuery.access$100(DatastoreQuery.java:115)
  at com.google.appengine.datanucleus.query.DatastoreQuery$1.apply(DatastoreQuery.java:221)
  at com.google.appengine.datanucleus.query.DatastoreQuery$1.apply(DatastoreQuery.java:219)
  at com.google.appengine.datanucleus.query.LazyResult.resolveNext(LazyResult.java:96)
  at com.google.appengine.datanucleus.query.LazyResult.resolveAll(LazyResult.java:121)
  at com.google.appengine.datanucleus.query.LazyResult.size(LazyResult.java:115)
  at com.google.appengine.datanucleus.query.StreamingQueryResult.size(StreamingQueryResult.java:151)
  at org.datanucleus.store.query.AbstractQueryResult.toArray(AbstractQueryResult.java:400)
  at java.util.ArrayList.addAll(Unknown Source)
  at org.datanucleus.query.evaluator.JavaQueryEvaluator.execute(JavaQueryEvaluator.java:160)
  at org.datanucleus.query.evaluator.JPQLEvaluator.execute(JPQLEvaluator.java:112)
  at com.google.appengine.datanucleus.query.JPQLQuery.performExecute(JPQLQuery.java:200)
  at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
  at org.datanucleus.store.query.Query.executeWithMap(Query.java:1693)
  at org.datanucleus.api.jpa.JPAQuery.getResultList(JPAQuery.java:185)
  </code></pre>
  
  <p>And for select query I use CriteriaAPI of JPA :</p>
  
  <pre><code>CriteriaBuilder cb = entityManager.getCriteriaBuilder();
  CriteriaQuery&lt;Technology&gt; cq = cb.createQuery(Technology.class);
  Root&lt;Technology&gt; e = cq.from(entityManager.getMetamodel().entity(Technology.class));
  cq.where(cb.equal(e.get(Technology_.name), {technologyName}));
  Query query = entityManager.createQuery(cq);
  List&lt;Technology&gt; list = query.getResultList();
  </code></pre>
  
  <p>And my Technology class is :
      @Entity
      public class Technology implements Serializable{</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "TechnologyID")
  private Long technologyID;
  
  @Column(name = "Name")
  private String name;
  
  public Long getTechnologyID() {
      return technologyID;
  }
  
  public void setTechnologyID(Long technologyID) {
      this.technologyID = technologyID;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  }
  </code></pre>
  
  <p>And there is a entity SignalStrength which has many to one relation with Technology:</p>
  
  <pre><code>@Entity
  public class SignalStrength {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "SignalStrengthID")
  private Long signalStrengthID;
  
  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "TechnologyID")
  private Technology technology;
  
  @Column(name = "SignalStrengthValue")
  private int signalStrengthValue;
  public Long getSignalStrengthID() {
      return signalStrengthID;
  }
  
  public void setSignalStrengthID(Long signalStrengthID) {
      this.signalStrengthID = signalStrengthID;
  }
  public Technology getTechnology() {
      return technology;
  }
  
  public void setTechnology(Technology technology) {
      this.technology = technology;
  }
  
  public int getSignalStrengthValue() {
      return signalStrengthValue;
  }
  
  public void setSignalStrengthValue(int signalStrengthValue) {
      this.signalStrengthValue = signalStrengthValue;
  }
  }
  </code></pre>
  
  <p>And datanucleus dependencies :</p>
  
  <pre><code>&lt;!-- Datanucleus dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.appengine.orm&lt;/groupId&gt;
          &lt;artifactId&gt;datanucleus-appengine&lt;/artifactId&gt;
          &lt;version&gt;2.0.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
          &lt;artifactId&gt;datanucleus-core&lt;/artifactId&gt;
          &lt;version&gt;${datanucleus.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
          &lt;artifactId&gt;datanucleus-api-jpa&lt;/artifactId&gt;
          &lt;version&gt;${datanucleus.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
          &lt;artifactId&gt;geronimo-jpa_2.0_spec&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
          &lt;artifactId&gt;datanucleus-enhancer&lt;/artifactId&gt;
          &lt;version&gt;3.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;persistence-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>What am I doing wrong? Please help.</p>