Class file not found in IntelliJ

前端 未结 8 1426
孤独总比滥情好
孤独总比滥情好 2020-12-15 17:59

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         


        
8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 18:42

    Isn't that similar to this SO question?

    The solution there was to add all JBoss jar (which you did), but also all persistent-related libraries (like Hibernate)

    See this JBoss project configuration for example:

    alt text http://jdick.co.uk/blog/wp-content/uploads/2008/12/projectstructure1.jpg

    In short, ejb3-persistence.jar might not be the problem here, just a symptom of other elements missing.
    Or, if it is the problem, it may be related to the fact that it is not deployed correctly (for the WebApp configuration).

提交回复
热议问题