Search code examples
jpajava-ee-6

stateless annotation cannot be found


I'm having a little problem using JPA (Hibernate)

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
/**
 * Bean decribing a user.
 * 
 */
@Entity
public class User implements Serializable {
... 

I'm able to use some of the annotation (like @Entity), as shown in the example above.

But @Stateless cannot be found by Eclipse. Why ?

I'm using the latest version from Hibernate (4.1.9) I created a user library containing all the required library from the hibernate directory. I upgraded my dynamic web project with the JPA Project Facet.


Solution

  • I solved my problem by using TomEE web server, which contains EJB implementation