SkClass
SkClass

Reputation: 11

Unable to deploy the application on web sphere. But it is deployed in tomcat

We are getting error which deploying the application on web sphere liberty server. Same application is deployed on Tomcat.

Exception :

An exception occurred while starting the application ONNO. The exception message was: com.ibm.ws.container.service.state.StateChangeEx ception: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name requestScope resolves to beans: [Producer Method [Map<Strin g, Object>] with qualifiers [@RequestMap @Any @Named] declared as [[UnbackedAnnotatedMethod] @Produces @RequestMap @Named @FacesScoped public org.apache.myfa ces.cdi.FacesArtifactProducer.getRequestMap()], com.sun.faces.cdi.RequestMapProducer@918359cd]

Tried to deploy on websphere. Deployed on tomcat successfully.

Upvotes: 0

Views: 70

Answers (1)

Deadron
Deadron

Reputation: 5289

Depending on which WebSphere you are deploying onto and what your configuration is may influence the particular problem. However, this looks like an issue where your application and websphere have both provided implementations for JSF which causes a problem when doing a bean lookup that resolves to multiple candidates. If you are using Tomcat, and not TomEE, it does not provide a JSF implementation at runtime, like websphere may, as it is a servlet container while websphere is an application server(One of the things they do is provide custom EE implementations). Without seeing more info I can only say that the solution in this case is that you probably need to remove your JSF implementation from being packaged into your application. You need to make sure you still have a reference to the JSF api to allow for application compilation.

Upvotes: 2

Related Questions