In IntelliJ I get this weird error when I try to compile.
Cannot find annotation method \'cascade()\' in type \'javax.persistence.ManyToOne\': class file for
Here's an idea:
Maybe you have multiple versions of your jar file.
Search your folder hierarchy for the file ejb3-persistence.jar,
using a file management tool such as Total Commander.
Multiple appearances of the file in your classpath may confuse IntelliJ Idea
into not recognizing the proper class in the proper jar.