Have put the persistence.xml in the classpath of the project in eclipse because before the error was that the file was not found. Now gives this error:
<
I have faced similar problem (Cannot find the declaration of element 'entity-mappings') in the past when I had persistence.xml with JPA version 2.0 & orm.xml file with version 2.1. I think the error reported above are similar.
Working samples for JPA 2. Read the sample below carefully and note their version. Ensure they are of same versions as in the samples. You may use JPA 2.1 and approprite schema reference as well.
persistence.xml
jdbc/sanjusDataSourceXA
META-INF/orm.xml
org.sanjus.pa.ejb.entity.UserEntity
orm.xml
SELECT a.userJson FROM UserEntity a WHERE a.userId = :userId