CDI deployment failure:WELD-001414 Bean name is ambiguous

前端 未结 3 1498
一整个雨季
一整个雨季 2021-01-12 00:22

I have an application, which has multiple modules and various dependencies. When I deploy the application on Glassfish 4, I am getting error:

org.jboss.weld.         


        
3条回答
  •  北海茫月
    2021-01-12 01:17

    Glassfish is already having Jerseys libraries packaged for you, so you need add provided scope into your Maven pom.xml as stated in the docs.

    
        javax.ws.rs
        javax.ws.rs-api
        2.0
        provided
    
    

    If you are using any Jersey specific feature, you will need to depend on Jersey directly.

    
        org.glassfish.jersey.containers
        jersey-container-servlet
        2.4.1
        provided
    
    
    
        org.glassfish.jersey.core
        jersey-client
        2.4.1
        provided
    
    

提交回复
热议问题