With regards to second concern - This might happen when you run mvn from command line for JBoss profile and then switch profile in IDE and try to run for glassfish. There might still be jboss profile settings in /target and those are picked up. Clean the project and try again.
For the first problem - can you share persistence.xml with us? I assume you are using EclipseLink.