annotations

Discussion in 'Java' started by hilz, Jan 14, 2006.

  1. hilz

    hilz Guest

    Hi.
    I am trying to use Hibernate Annotations, and i get a compile error:

    .....path...\MyClass.java:16: cannot find symbol
    symbol: class Entity
    @Entity

    my code looks like this:

    @Entity
    @Table(name="MYCLASSTABLE")
    public class MyClass {
    ...


    is there something special i need to do in order to compile with
    annotations?
    I have the hibernate and hibernate annotations jars in my classpath, and
    i am using jdk 1.5

    any help is appreciated.
    hilz, Jan 14, 2006
    #1
    1. Advertising

  2. hilz

    hilz Guest

    hilz wrote:
    > Hi.
    > I am trying to use Hibernate Annotations, and i get a compile error:
    >
    > ....path...\MyClass.java:16: cannot find symbol
    > symbol: class Entity
    > @Entity
    >
    > my code looks like this:
    >
    > @Entity
    > @Table(name="MYCLASSTABLE")
    > public class MyClass {
    > ...
    >
    >
    > is there something special i need to do in order to compile with
    > annotations?
    > I have the hibernate and hibernate annotations jars in my classpath, and
    > i am using jdk 1.5
    >
    > any help is appreciated.



    Never mind.... it's been a long day!
    I forgot to import the import javax.persistence.....
    hilz, Jan 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Efy.
    Replies:
    1
    Views:
    531
    Nicole Calinoiu
    Sep 22, 2003
  2. Replies:
    3
    Views:
    543
    Chris Uppal
    Jan 25, 2005
  3. Ingo R. Homann
    Replies:
    0
    Views:
    546
    Ingo R. Homann
    Jul 26, 2005
  4. Vidar S. Ramdal

    Annotations and Retention

    Vidar S. Ramdal, Aug 18, 2005, in forum: Java
    Replies:
    2
    Views:
    654
    Vidar S. Ramdal
    Aug 19, 2005
  5. Stefan Ram

    Jalopy does not format annotations

    Stefan Ram, Sep 26, 2005, in forum: Java
    Replies:
    2
    Views:
    573
    Roedy Green
    Sep 26, 2005
Loading...

Share This Page