Skip to main content

javax.persistence.Entity

1 reply [Last post]
rich_carne
Offline
Joined: 2008-03-22

Hi,

I am attempting to follow a tutorial on the JPA using Eclipse as my IDE. When I map a class as Entity the following import is automaticaly added: import javax.persistence.Entity;
However I get an error saying that the import cannot be resolved?

I am running the Java EE 5 SDK is this correct or am I missing some Java framework somewhere.

Any help would be appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jwenting
Offline
Joined: 2003-12-02

you will need to have the JEE client libraries on the classpath of both your compiler and runtime, which inside Eclipse means adding them to your project libraries.