Topic
  • 2 replies
  • Latest Post - ‏2014-01-30T19:29:54Z by C7YC_David_Westerman
C7YC_David_Westerman
12 Posts

Pinned topic Liberty: Can't Find BeanManager

‏2014-01-29T19:53:09Z |

I have a web application that I am trying to run under Liberty, and am getting the following error:

                 E Uncaught.init.exception.thrown.by.servlet
                                                                                                               JAX-RS Servlet
                                                                                                               WestyWideWeb
                                                                                                               java.lang.NoClassDefFoundError: javax.enterprise.inject.spi.BeanManager
    at org.apache.wink.jcdi.server.internal.lifecycle.JCDILifecycleManager.setBeanManager(JCDILifecycleManager.java:58)
    at com.ibm.ws.jaxrs.configuration.IBMDeploymentConfiguration.<init>(IBMDeploymentConfiguration.java:52)
    at com.ibm.websphere.jaxrs.server.IBMRestServlet.createDeploymentConfiguration(IBMRestServlet.java:289)
    at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:180)
    at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:129)
    at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:94)
    at javax.servlet.GenericServlet.init(GenericServlet.java:161)
 

I have the following in my feature list for the server:

        <feature>jsp-2.2</feature>
        <feature>localConnector-1.0</feature>
        <feature>blueprint-1.0</feature>
        <feature>jpa-2.0</feature>
        <feature>jndi-1.0</feature>
        <feature>wab-1.0</feature>
        <feature>jaxrs-1.1</feature>
        <feature>cdi-1.0</feature>
        <feature>jdbc-4.0</feature>
        <feature>jsf-2.0</feature>
        <feature>ejbLite-3.2</feature>
 

The class that is not being found, 'javax.enterprise.inject.spi.BeanManager', is in the 'WLPROOT/dev/api/spec/com.ibm.ws.javaee.cdi.1.0_1.0.0.jar' jar file. Is there something I need to do for it to find that jar? Am I missing a feature? I thought having 'cdi-1.0' would do it.

  • Alasdair
    Alasdair
    55 Posts
    ACCEPTED ANSWER

    Re: Liberty: Can't Find BeanManager

    ‏2014-01-29T22:38:46Z  

    Hi,

    Can you try stopping the server and then starting the server with the --clean open when you start the server again? If you are in WDT right click on the server in the servers view and select the "Clean server on next start" option before restarting it.

    If that works then it indicates a bug, I'd expect we could fix it via a PMR, but the --clean should only be needed once.

    Thanks
    Alasdair

  • Alasdair
    Alasdair
    55 Posts

    Re: Liberty: Can't Find BeanManager

    ‏2014-01-29T22:38:46Z  

    Hi,

    Can you try stopping the server and then starting the server with the --clean open when you start the server again? If you are in WDT right click on the server in the servers view and select the "Clean server on next start" option before restarting it.

    If that works then it indicates a bug, I'd expect we could fix it via a PMR, but the --clean should only be needed once.

    Thanks
    Alasdair

  • C7YC_David_Westerman
    12 Posts

    Re: Liberty: Can't Find BeanManager

    ‏2014-01-30T19:29:54Z  
    • Alasdair
    • ‏2014-01-29T22:38:46Z

    Hi,

    Can you try stopping the server and then starting the server with the --clean open when you start the server again? If you are in WDT right click on the server in the servers view and select the "Clean server on next start" option before restarting it.

    If that works then it indicates a bug, I'd expect we could fix it via a PMR, but the --clean should only be needed once.

    Thanks
    Alasdair

    Thanks, Alasdair. Cleaning the server did take care of the problem.

    Cheers,
    Dave