WELD-001301 on Glassfish

Just ran into a great error on upgrading to Glassfish 4.  Couple of references to it from Google but no solution.

Glassfish log:

[2013-12-22T07:02:51.014+1100] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=36 _ThreadName=admin-listener(4)] [timeMillis: 1387656171014] [levelValue: 1000] [[
  Exception while loading the app : CDI deployment failure:WELD-001301 Annotation @org.glassfish.api.admin.RestEndpoints(value=[@org.glassfish.api.admin.RestEndpoint(description=disable-secure-admin, path=disable-secure-admin, opType=POST, params=[], useForAuthorization=false, configBean=interface com.sun.enterprise.config.serverbeans.Domain)]) is not a qualifier
org.jboss.weld.exceptions.IllegalArgumentException: WELD-001301 Annotation @org.glassfish.api.admin.RestEndpoints(value=[@org.glassfish.api.admin.RestEndpoint(description=disable-secure-admin, path=disable-secure-admin, opType=POST, params=[], useForAuthorization=false, configBean=interface com.sun.enterprise.config.serverbeans.Domain)]) is not a qualifier

Turns out I had some modules from Glassfish included into a library in the project so I could compile some EJBs.  Turns out as well that including that library in the deployed EAR is a bad idea :).

Simply told Netbeans not to package it in the Project Properties -> Libraries page and all was good again.

Simple error – only put it here because I couldn’t find anything on the net.  Had to do the hard yards myself.  Hate that!

Oh yes – and you have to clean and build otherwise the library doesn’t get cleaned out from the build directory.  (I know it’s obvious – but it messed me up for a while.)

Leave a Reply

4 thoughts on “WELD-001301 on Glassfish”

  1. One one hand, your answer is exactly what I needed.
    On the other hand, it is too vague to be of any use to me, a newbie.

    I have a very similar error. How do I know what I need to exclude? Is there some hint in the stack trace or some other error message?

    I’m sorry to Lazarus this, but I’ve been searching for answers and this is the closest I’ve came so far.

  2. Hiya,

    From memory I did it by trial and error. Took out anything that looked like it might be a glassfish jar and told it not to package it in the WAR/EAR. I can’t be more exact than that as I switched to Wildfly so I can’t even have a look at my current build.

    Cheers,
    Berin

  3. To be honest, as old as this thread was, I wasn’t even sure if I would get a response. I do appreciate the quick turn around.