Got persistence.xml working (apparently you have to spell persistence right). Also fixed a few bugs in the code (invalid table name, queries that were created were invalid)