Getting data from GAE using EntityManager

koogame

New Member
I have populated the datastore table using the Python appcfg.py tool whih imports data from a CSV file. I can see the table data at localhost:8888/_ah/admin/datastore but I keep getting this error when I hover over the List var when I call GetData() below.\[code\]com.sun.jdi.InvocationException occurred invoking method.\[/code\]That's all the errors I get, and I just can't figure out what might be wrong?EMF\[code\]public final class EMF { private static final EntityManagerFactory emfInstance = Persistence .createEntityManagerFactory("transactions-optional"); private EMF() {} public static EntityManagerFactory get() { return emfInstance; }}\[/code\]Query\[code\]public String GetData(final ModelMap model){ EntityManager em = EMF.get().createEntityManager(); List<Test> testData= http://stackoverflow.com/questions/15862248/em.createQuery("SELECT t FROM Test t").getResultList(); em.close(); return "index";}\[/code\]Entity\[code\]public class Test { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int blah1; private String blah2; private double blah3; // getters setters }\[/code\]persistence.xml\[code\]<?xml version="1.0" encoding="UTF-8" ?><persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="transactions-optional"> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider> <properties> <property name="datanucleus.NontransactionalRead" value="http://stackoverflow.com/questions/15862248/true"/> <property name="datanucleus.NontransactionalWrite" value="http://stackoverflow.com/questions/15862248/true"/> <property name="datanucleus.ConnectionURL" value="http://stackoverflow.com/questions/15862248/appengine"/> </properties> </persistence-unit></persistence> \[/code\]
 
Top