GlassFish Error: JAX-RS EJB support is disabled

12,119

Looks like this is an Eclipse issue. I did the deployment using Eclipse with the GlassFish adapter. Restarting Eclipse solved it.

Solution: Shutdown GlassFish, inside Eclipse go to Project->Clean(select project) and then start GlassFish again.

I don't know why but it worked. :)

Share:
12,119
Adrian M
Author by

Adrian M

Updated on June 03, 2022

Comments

  • Adrian M
    Adrian M almost 2 years

    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;
        }
    
    
    }
    
  • angelcervera
    angelcervera over 11 years
    Same problem in a production system,son eclipse is not the problem :(
  • Graham
    Graham almost 11 years
    Same problem in NetBeans after deploying a Singleton EJB, and this solved it for me.
  • Alex Pritchard
    Alex Pritchard about 10 years
    I also had this issue after deplying a Singleton EJB. Using EE 7 in eclipse.
  • Alex Pritchard
    Alex Pritchard about 10 years
    Actually this seems unrelated (or only indirectly related) to Singleton. I can reproduce it by including certain Maven projects on my path that break the deploy to glassfish with a CDI deployment failure (I think caused by annotations in the jars?). If I add, try and fail to deploy, remove, and then deploy again, I start receiving the Jax-RS EJB integration errors again. Cleaning the project and restarting glassfish resolves the issue.
  • Michael Paesold
    Michael Paesold about 8 years
    Got this problem with Glassfish 3.1.2.2, too, when redeploying a .war using Jersey with EJBs. even without Eclipse. Undeploying and deploying again did not help, but restarting Glassfish did help.
  • phil294
    phil294 over 7 years
    IntelliJ user here. Restarting (not only redeploying) the glassfish project helps in 90%. However now, I had to remove the artifacts from the run configuration (without re-adding them afterwards. ide even says "warning, no artifacts selected"). no idea why this works but it does