Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>model and persistence obviously depend on javax.persistence, but application shouldn't, I think.</p> </blockquote> <p>That's true. But transitive dependencies resolution has nothing to do with your problem (and actually, <code>javax.persistence</code> is <code>provided</code> to <code>model</code> and <code>persistence</code> on which <code>application</code> depends with a <code>compile</code> scope so it's omitted as documented in <a href="http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-project-dependencies.html#pom-relationships-sect-transitive" rel="noreferrer">3.4.4. Transitive Dependencies</a>).</p> <p>In my opinion, you are victim of this bug: <a href="http://bugs.sun.com/view_bug.do?bug_id=6550655" rel="noreferrer">http://bugs.sun.com/view_bug.do?bug_id=6550655</a> </p> <blockquote> <p>I have the same issues with an EJB3 entity that uses the Inheritance annotation: <code>@Inheritance(strategy=InheritanceType.SINGLE_TABLE)</code></p> <p>A client class using this entity won't compile when the ejb3 annatations are not on the classpath, but crash with the following message: <code>com.sun.tools.javac.code.Symbol$CompletionFailure: class file for javax.persistence.InheritanceType not found</code></p> <p>[...]</p> <p>Note that is a special case of bug 6365854 (that is reported to be fixed); the problem here seems to be that the annotation is using an enum as its value.</p> </blockquote> <p>The current workaround is to add the missing enum to the CLASSPATH. </p> <p>In your case, the "less worse" way to do that would be to add <code>javax.persistence</code> as <code>provided</code> dependency to the <code>application</code> module. But that's a workaround to the JVM bug, <code>application</code> shouldn't need that dependency to compile.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload