Leonardo,

Jose uses/deploys EARs. Maybe that is the issue. Has MyFaces 2.2
@ViewScoped been tested in an EAR.

Jose,

You need to provide more of your configuration and share that you usually
deploy your app via EAR(s). right?



On Wed, Jan 15, 2014 at 5:48 PM, Leonardo Uribe <lu4...@gmail.com> wrote:

> Hi
>
> It looks like something not directly related to MyFaces, it is like if
> the classpath is scanned twice, or like the bean is subscribed twice.
> I suppose it is a bug in OWB or in TomEE. Maybe you should report it
> in:
>
> https://issues.apache.org/jira/browse/TOMEE
>
> regards,
>
> Leonardo Uribe
>
> 2014/1/15 José Luis Cetina <maxtorz...@gmail.com>:
> > Hi. I use TomEE 1.6.0 Final release with myfaces 2.1.13 and jdk 1.7 with
> > this i was using the org.omnifaces.cdi.ViewScoped annotation with any
> > problem, with the new release of myfaces 2.2.0 i decide to change from
> > org.omnifaces.cdi.ViewScoped to javax.faces.view.ViewScoped then im
> gettin
> > this AmbiguousResolutionException.
> >
> >
> > This error only happend in Linux environment, if i run the same project
> in
> > Windows this error never appears.
> >
> >
> > I removed my faces 2.1.13 jars (api and imp) from tomee lib and add
> myfaces
> > api and impl 2.2.0
> >
> >
> > What could be wrong?
> >
> > Log:
> >
> > javax.enterprise.inject.AmbiguousResolutionException: Ambiguous
> resolution
> > found beans:
> > ViewScopeBeanHolder, Name:null, WebBeans Type:MANAGED, API
> >
> Types:[java.io.Serializable,java.lang.Object,org.apache.myfaces.cdi.view.ViewScopeBeanHolder],
> > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]
> > from
> jar:file:/home/broncos/apache/tomee/apache-tomee-jaxrs-1.6.0/lib/myfaces-impl-2.2.0.jar!/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.class
> > ViewScopeBeanHolder, Name:null, WebBeans Type:MANAGED, API
> >
> Types:[java.io.Serializable,java.lang.Object,org.apache.myfaces.cdi.view.ViewScopeBeanHolder],
> > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]
> > from
> jar:file:/home/broncos/apache/tomee/apache-tomee-jaxrs-1.6.0/lib/myfaces-impl-2.2.0.jar!/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.class
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionExceptionForBeans(InjectionExceptionUtil.java:104)
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionException(InjectionExceptionUtil.java:94)
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionException(InjectionExceptionUtil.java:71)
> >
> org.apache.webbeans.container.InjectionResolver.resolve(InjectionResolver.java:699)
> >
> org.apache.webbeans.container.BeanManagerImpl.resolve(BeanManagerImpl.java:925)
> >
> org.apache.webbeans.container.InjectableBeanManager.resolve(InjectableBeanManager.java:201)
> >
> org.apache.myfaces.cdi.util.BeanProvider.getContextualReference(BeanProvider.java:413)
> >
> org.apache.myfaces.cdi.util.BeanProvider.getContextualReference(BeanProvider.java:144)
> >
> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.getViewScopeBeanHolder(CDIManagedBeanHandlerImpl.java:64)
> >
> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.generateViewScopeId(CDIManagedBeanHandlerImpl.java:92)
> >
> org.apache.myfaces.view.ViewScopeProxyMap.getWrapped(ViewScopeProxyMap.java:76)
> >
> org.apache.myfaces.view.ViewScopeProxyMap.size(ViewScopeProxyMap.java:89)
> >         javax.faces.component.UIViewRoot.saveState(UIViewRoot.java:1498)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:846)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter.debugHtml(ErrorPageWriter.java:351)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter.handle(ErrorPageWriter.java:470)
> >
> org.apache.myfaces.context.MyFacesExceptionHandlerWrapperImpl.handle(MyFacesExceptionHandlerWrapperImpl.java:301)
> >
> javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:61)
> >
> org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handle(FullAjaxExceptionHandler.java:162)
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:287)
> >         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>

Reply via email to