GlassFish Error: JAX-RS EJB support is disabled

Viewed 12248

I am trying a simple app using Jersey JAX-RS + EJB 3.1 on GlassFish 3.1.2.2. All seemed to look pretty well with Jersey REST on GlassFish until I added EJB. When deploying the war file, I got this error.

SEVERE: Error when configuring to use the EJB interceptor binding API. JAX-RS EJB support is disabled.

Anyone who has encountered this before? Is there a configuration in GlassFish to fix this?

My EJB is a simple pojo with @Singleton and @PostConstruct annotation.

@Singleton
public class PurchaseBean {
    private String name;

    @PostConstruct
    public void init() {
        System.out.println("Initializing PurchaseBean");
        setName("Purchase Singleton EJB");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}
2 Answers

Working solution or the ones who run the Glassfish standalone: Restart the Glassfish. Glassfish version number 4.1.2

Related