Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 635DE4D63 for ; Tue, 5 Jul 2011 13:00:17 +0000 (UTC) Received: (qmail 79163 invoked by uid 500); 5 Jul 2011 13:00:16 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 79010 invoked by uid 500); 5 Jul 2011 13:00:15 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 78992 invoked by uid 99); 5 Jul 2011 13:00:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 13:00:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gerhard.petracek@gmail.com designates 209.85.161.181 as permitted sender) Received: from [209.85.161.181] (HELO mail-gx0-f181.google.com) (209.85.161.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 13:00:10 +0000 Received: by gxk9 with SMTP id 9so2686646gxk.12 for ; Tue, 05 Jul 2011 05:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=X7uhKmPv4DNXU3G8C0lBjhbu+hrBqg9TF8vTkpyopcs=; b=nB7JrIBefov8G7eFtqOvpBCYR43KRmKk0eHNlHwF7e6NYsC5dzQwBg6XNdeS/kfJEp ogimpqvHqx3DxXk44j22Y1cCwohKNd822t8gHLxz7sPcU/pPl2ggrPkvHlWm/XJFZsS9 FT+UvRHcqiEaMO/AOpVchOH212V8Q4rVUnuio= Received: by 10.236.109.4 with SMTP id r4mr8392079yhg.25.1309870789221; Tue, 05 Jul 2011 05:59:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.116.131 with HTTP; Tue, 5 Jul 2011 05:59:29 -0700 (PDT) In-Reply-To: References: <09536e2c645e9379734e6aaed6ac7be2@imap.bredband.net> From: Gerhard Petracek Date: Tue, 5 Jul 2011 14:59:29 +0200 Message-ID: Subject: Re: Error booting CODI on WebSphere 8 (OWB) - WebBeans context with scope type annotation @ApplicationScoped does not exist within current thread To: MyFaces Discussion Content-Type: multipart/alternative; boundary=0023547c8e8717dbc904a7520f3e --0023547c8e8717dbc904a7520f3e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hi hampus, ok - thx. it looks like they also have a classloader issue. we could bypass that as well but that's a jsf-api class used by codi. so if this one doesn't work, i guess others won't work as well. if you would like to test it, you can deactivate ViewScopedExtension with the same approach provided by codi or you remove it manually from META-INF/services/javax.enterprise.inject.spi.Extension regards, gerhard http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/7/5 Hampus Wingren > Hi > > So I got further with enabling the > org.apache.webbeans.application.useJSF2Extensions property to true (it=B4= s > false by default) but now I=B4ve got some really strange ClassNotFound > problems (javax.faces.beans.ViewScoped) but I guess that it=B4s not > related to CODI. > > I think I=B4ll open a PMR with IBM and I=B4ll get back if they present an= y > solution. > > (If you=B4ve not seen this before): > > Caused by: javax.enterprise.event.ObserverException: Caught Exception > while handling event object with type : > org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl > at > > org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManag= er.java:448) > at > > org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.j= ava:415) > at > > org.apache.webbeans.config.BeansDeployer.fireAfterBeanDiscoveryEvent(Bean= sDeployer.java:269) > at > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:180) > at > > org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(Abstract= LifeCycle.java:124) > at > > org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(= WebContainerLifecycle.java:78) > at > > com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCyc= le.java:106) > at > > com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JC= DIServletContainerInitializer.java:85) > at > > com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerIniti= alizers(WebAppImpl.java:609) > at > com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:405) > at > > com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImp= l.java:88) > at > > com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl= .java:169) > ... 17 more > Caused by: org.apache.webbeans.exception.WebBeansException: > java.lang.reflect.InvocationTargetException > at > > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.ja= va:282) > at > > org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManag= er.java:434) > ... 28 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :60) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:37) > at java.lang.reflect.Method.invoke(Method.java:611) > at > > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.ja= va:276) > ... 29 more > Caused by: java.lang.NoClassDefFoundError: javax.faces.bean.ViewScoped > at > > org.apache.webbeans.jsf.scopes.ViewScopedContext.getScope(ViewScopedConte= xt.java:148) > at > > org.apache.webbeans.container.BeanManagerImpl.addContext(BeanManagerImpl.= java:375) > at > > org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addC= ontext(AfterBeanDiscoveryImpl.java:153) > at > > org.apache.webbeans.jsf.scopes.Jsf2ScopesExtension.registerViewContext(Js= f2ScopesExtension.java:59) > ... 34 more > Caused by: java.lang.ClassNotFoundException: > javax.faces.bean.ViewScoped > at > > org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoa= der.java:506) > at > > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java= :422) > at > > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java= :410) > at > > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defaul= tClassLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:612) > ... 38 more > > Thanks for your replies... > > Regards, > Hampus > > On Tue, 5 Jul 2011 13:50:47 +0200, Gerhard Petracek > wrote: > > fyi: i talked with a member of the websphere team and it looks like it = is > a > > known issue of the owb integration. > > the next fixpack should fix it. however, if you have time for testing i= t, > > you can try what i wrote in my previous answer. > > > > regards, > > gerhard > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2011/7/5 Gerhard Petracek > > > >> short addition: > >> > >> we could do this specific part lazily. however, we would have to test = if > >> there are additional initialization tasks which are affected. > >> it's possible to deactivate the navigation handler with the deactivati= on > >> concept described in the wiki. > >> as an alternative (just for testing), you could remove the > >> navigation-handler from the faces-config.xml in the jar file of codi. > >> > >> regards, > >> gerhard > >> > >> http://www.irian.at > >> > >> Your JSF powerhouse - > >> JSF Consulting, Development and > >> Courses in English and German > >> > >> Professional Support for Apache MyFaces > >> > >> > >> > >> 2011/7/5 Gerhard Petracek > >> > >>> hi hampus, > >>> > >>> it looks like they bootstrap jsf before cdi which doesn't make sense. > >>> we have to talk with the websphere team. > >>> > >>> regards, > >>> gerhard > >>> > >>> http://www.irian.at > >>> > >>> Your JSF powerhouse - > >>> JSF Consulting, Development and > >>> Courses in English and German > >>> > >>> Professional Support for Apache MyFaces > >>> > >>> > >>> > >>> 2011/7/5 Hampus Wingren > >>> > >>>> I=B4m having trouble bootstrapping the CODI environment. I=B4ve depl= oyed > the > >>>> 0.9.5 version of CODI on WebSphere 8 running open webbeans but as th= e > JSF > >>>> runtime initializes I get this stack trace: > >>>> > >>>> [2011-07-05 09:50:29:809 CEST] 0000000c ClassUtils E > >>>> java.lang.reflect.** > >>>> InvocationTargetException > >>>> at > sun.reflect.**NativeConstructorAccessorImpl.**newInstance0(Native > >>>> Method) > >>>> at sun.reflect.**NativeConstructorAccessorImpl.**newInstance(= ** > >>>> NativeConstructorAccessorImpl.**java:56) > >>>> at > sun.reflect.**DelegatingConstructorAccessorI**mpl.newInstance( > >>>> **DelegatingConstructorAccessorI**mpl.java:39) > >>>> at > java.lang.reflect.Constructor.**newInstance(Constructor.java:* > >>>> *527) > >>>> at org.apache.myfaces.shared_**impl.util.ClassUtils.** > >>>> buildApplicationObject(**ClassUtils.java:539) > >>>> at org.apache.myfaces.config.**FacesConfigurator.** > >>>> configureApplication(**FacesConfigurator.java:694) > >>>> at org.apache.myfaces.config.**FacesConfigurator.configure(** > >>>> FacesConfigurator.java:459) > >>>> at org.apache.myfaces.webapp.**AbstractFacesInitializer.** > >>>> buildConfiguration(**AbstractFacesInitializer.java:**313) > >>>> at org.apache.myfaces.webapp.**Jsp21FacesInitializer.** > >>>> initContainerIntegration(**Jsp21FacesInitializer.java:73) > >>>> at org.apache.myfaces.webapp.**AbstractFacesInitializer.** > >>>> initFaces(**AbstractFacesInitializer.java:**136) > >>>> at org.apache.myfaces.webapp.**StartupServletContextListener.= ** > >>>> contextInitialized(**StartupServletContextListener.**java:111) > >>>> at com.ibm.ws.webcontainer.**webapp.WebApp.** > >>>> notifyServletContextCreated(**WebApp.java:1649) > >>>> at com.ibm.ws.webcontainer.**webapp.WebAppImpl.initialize(** > >>>> WebAppImpl.java:410) > >>>> at com.ibm.ws.webcontainer.**webapp.WebGroupImpl.** > >>>> addWebApplication(**WebGroupImpl.java:88) > >>>> at > com.ibm.ws.webcontainer.**VirtualHostImpl.**addWebApplication( > >>>> **VirtualHostImpl.java:169) > >>>> at com.ibm.ws.webcontainer.**WSWebContainer.addWebApp(** > >>>> WSWebContainer.java:748) > >>>> at > com.ibm.ws.webcontainer.**WSWebContainer.**addWebApplication(* > >>>> *WSWebContainer.java:633) > >>>> at com.ibm.ws.webcontainer.**component.WebContainerImpl.** > >>>> install(WebContainerImpl.java:**422) > >>>> at com.ibm.ws.webcontainer.**component.WebContainerImpl.** > >>>> start(WebContainerImpl.java:**714) > >>>> at com.ibm.ws.runtime.component.**ApplicationMgrImpl.start(** > >>>> ApplicationMgrImpl.java:1143) > >>>> at com.ibm.ws.runtime.component.**DeployedApplicationImpl.** > >>>> fireDeployedObjectStart(**DeployedApplicationImpl.java:**1369) > >>>> at com.ibm.ws.runtime.component.**DeployedModuleImpl.start(** > >>>> DeployedModuleImpl.java:638) > >>>> at > com.ibm.ws.runtime.component.**DeployedApplicationImpl.start(* > >>>> *DeployedApplicationImpl.java:**967) > >>>> at com.ibm.ws.runtime.component.**ApplicationMgrImpl.** > >>>> startApplication(**ApplicationMgrImpl.java:731) > >>>> at com.ibm.ws.runtime.component.**ApplicationMgrImpl.start(** > >>>> ApplicationMgrImpl.java:2136) > >>>> at > com.ibm.ws.runtime.component.**CompositionUnitMgrImpl.start(** > >>>> CompositionUnitMgrImpl.java:**445) > >>>> at com.ibm.ws.runtime.component.**CompositionUnitImpl.start(*= * > >>>> CompositionUnitImpl.java:123) > >>>> at > com.ibm.ws.runtime.component.**CompositionUnitMgrImpl.start(** > >>>> CompositionUnitMgrImpl.java:**388) > >>>> at > com.ibm.ws.runtime.component.**CompositionUnitMgrImpl.access$* > >>>> *500(CompositionUnitMgrImpl.**java:116) > >>>> at com.ibm.ws.runtime.component.**CompositionUnitMgrImpl$** > >>>> CUInitializer.run(**CompositionUnitMgrImpl.java:**994) > >>>> at com.ibm.wsspi.runtime.**component.WsComponentImpl$_** > >>>> AsynchInitializer.run(**WsComponentImpl.java:349) > >>>> at com.ibm.ws.util.ThreadPool$**Worker.run(ThreadPool.java:** > >>>> 1648) > >>>> Caused by: javax.enterprise.context.**ContextNotActiveException: > >>>> WebBeans context with scope type annotation @ApplicationScoped does > not > >>>> exist within current thread > >>>> at > org.apache.webbeans.container.**BeanManagerImpl.getContext(** > >>>> BeanManagerImpl.java:321) > >>>> at > org.apache.webbeans.intercept.**NormalScopedBeanInterceptorHan > >>>> **dler.getContextualInstance(**NormalScopedBeanInterceptorHan** > >>>> dler.java:124) > >>>> at > org.apache.webbeans.intercept.**NormalScopedBeanInterceptorHan > >>>> **dler.invoke(**NormalScopedBeanInterceptorHan**dler.java:95) > >>>> at org.apache.myfaces.extensions.**cdi.jsf.api.config.** > >>>> JsfModuleConfig_$$_javassist_**6.**isUseViewConfigsAsNavigationCa** > >>>> sesEnabled(JsfModuleConfig_$$_**javassist_6.java) > >>>> at org.apache.myfaces.extensions.**cdi.jsf2.impl.navigation.*= * > >>>> CodiNavigationHandler.**isAddViewConfigsAsNavigationCa**seActivated(= ** > >>>> CodiNavigationHandler.java:**146) > >>>> at org.apache.myfaces.extensions.**cdi.jsf2.impl.navigation.*= * > >>>> CodiNavigationHandler.(**CodiNavigationHandler.java:57) > >>>> ... 32 more > >>>> > >>>> > >>>> Anyone got any suggestions? > >>>> > >>>> Best regards, > >>>> Hampus > >>>> > >>>> > >>> > >> > > --0023547c8e8717dbc904a7520f3e--