It is unfortunate that the persistence-example.html page doesn't show persistence.xml. Instead it has a screen shot for NetBeans. So when I went looking around for examples the one I found was apparently out of date with the errors outlined below. I also found references in the forums that persistence.xml should be in the classpath. That's wrong. It has to be in META-INF even if there is no jar file.
The example here is complete but hard to find since there is not a link to the "persistence" page from the glassfish.dev.java.net home page -
https://glassfish.dev.java.net/javaee5/persistence/entity-persistence-support.html#Java_SE
[Message sent by forum member 'jotobjects' (jotobjects)]
http://forums.java.net/jive/thread.jspa?messageID=204914