<p>I have a class Animal and an interface it inherits from IAnimal.</p>

<pre><code>@MappedSuperclass
public class Animal implements Serializable, IAnimal{...}.

@Entity
public class Jaguar extends Animal{...}
</code></pre>

<p>My first question is, do I need to annotate the interface?</p>

<p>I asked this because I am getting this error when I run my tests:</p>

<blockquote>
  <p>Error compiling the query [SELECT s
  FROM  animal s WHERE s.atype =
  :atype].
  Unknown abstract schema type
  [animal]</p>
</blockquote>

<p>If I remember correctly, before I added this interface it was working.</p>

Here are a bunch of good textbooks:
Modern Compiler Implementation in Java (Tiger book) 
A.W. Appel 
Cambridge University Press, 1998 
ISBN 0-52158-388-8 
A textbook tutorial on compiler implementation, including techniques for many language features
Compilers: Principles, Techniques and Tools (Dragon book) 
Aho, Lam, Sethi and Ullman 
Addison-Wesley, 2006 
ISBN 0321486811 
The classic compilers textbook, although its front-end emphasis reflects its age.
Advanced Compiler Design and Implementation (Whale book) 
Steven Muchnick 
Morgan Kaufman Publishers, 1997 
ISBN 1-55860-320-4 
Essentially a recipe book of optimizations; very complete and suited for industrial practitioners and researchers.
Engineering a Compiler (Ark book) 
Keith D. Cooper, Linda Torczon 
Morgan Kaufman Publishers, 2003 
ISBN 1-55860-698-X 
A modern classroom textbook, with increased emphasis on the back-end and implementation techniques.
Optimizing Compilers for Modern Architectures 
Randy Allen and Ken Kennedy 
Morgan Kaufman Publishers, 2001 
ISBN 1-55860-286-0 
A modern textbook that focuses on optimizations including parallelization and memory hierarchy optimizations.
Programming Languages Pragmatics 
Michael L. Scott 
Morgan Kaufmann Publishers, 2005 
ISBN 0126339511