It shouldn't be at the project root, but directly under the source folder.
At runtime, the persistence.xml file is searched in the classpath, under META-INF. So if you want the META-INF folder to be put at the top of the compiled package tree, you need to put it at the top of the source tree. Eclipse copies every non-Java file to its output directory (bin, by default), respecting the package/folder hierarchy.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…