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 ACE4947C2 for ; Tue, 5 Jul 2011 13:14:00 +0000 (UTC) Received: (qmail 3608 invoked by uid 500); 5 Jul 2011 13:13:59 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 3546 invoked by uid 500); 5 Jul 2011 13:13:59 -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 3538 invoked by uid 99); 5 Jul 2011 13:13:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 13:13:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hampus.wingren@bredband.net designates 195.54.99.212 as permitted sender) Received: from [195.54.99.212] (HELO smtprelay-b21.telenor.se) (195.54.99.212) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 13:13:50 +0000 Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b21.telenor.se (Postfix) with ESMTP id EA4A4E9CFC for ; Tue, 5 Jul 2011 15:13:29 +0200 (CEST) X-SMTPAUTH-B2: [cpuser_hampe98@bredband.net] X-SENDER-IP: [195.54.99.132] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4DAEMNE07DNmOEgWdsb2JhbABThEKjUQEBFiYliHyyAZBZgSuBFIJrgQwEkjaJSoZu X-IronPort-AV: E=Sophos;i="4.65,479,1304287200"; d="scan'208";a="1745674932" Received: from cwpb-web01.bredband.net (HELO www.bredbandsbolaget.se) ([195.54.99.132]) by ipb4.telenor.se with ESMTP; 05 Jul 2011 15:13:29 +0200 Received: from proxy2.swedbank.se ([164.10.46.62]) by www.bredbandsbolaget.se with HTTP (HTTP/1.1 POST); Tue, 05 Jul 2011 15:13:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Tue, 05 Jul 2011 15:13:29 +0200 From: Hampus Wingren To: MyFaces Discussion Subject: Re: Error booting CODI on WebSphere 8 (OWB) - WebBeans context with scope type annotation @ApplicationScoped does not exist within current thread In-Reply-To: References: <09536e2c645e9379734e6aaed6ac7be2@imap.bredband.net> Message-ID: <6a02cf1ebcb4cef3ab65c5d33b6669b5@imap.bredband.net> X-Sender: hampus.wingren@bredband.net User-Agent: Roundcube Webmail/0.4 X-Virus-Checked: Checked by ClamAV on apache.org It looks like they don´t set the contextclassloader to the web app loader before they start it up. Now they use the OSGI classloaders which seems to be loading stuff above the jee loader, hence the error. I think that this is a common regression from release to release. We´ve seen this before. regards, Hampus On Tue, 5 Jul 2011 14:59:29 +0200, Gerhard Petracek wrote: > 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´s >> false by default) but now I´ve got some really strange ClassNotFound >> problems (javax.faces.beans.ViewScoped) but I guess that it´s not >> related to CODI. >> >> I think I´ll open a PMR with IBM and I´ll get back if they present any >> solution. >> >> (If you´ve 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(NotificationManager.java:448) >> at >> >> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:415) >> at >> >> org.apache.webbeans.config.BeansDeployer.fireAfterBeanDiscoveryEvent(BeansDeployer.java:269) >> at >> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:180) >> at >> >> org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124) >> at >> >> org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78) >> at >> >> com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106) >> at >> >> com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85) >> at >> >> com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:609) >> at >> com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:405) >> at >> >> com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.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.java:282) >> at >> >> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.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(DelegatingMethodAccessorImpl.java:37) >> at java.lang.reflect.Method.invoke(Method.java:611) >> at >> >> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:276) >> ... 29 more >> Caused by: java.lang.NoClassDefFoundError: javax.faces.bean.ViewScoped >> at >> >> org.apache.webbeans.jsf.scopes.ViewScopedContext.getScope(ViewScopedContext.java:148) >> at >> >> org.apache.webbeans.container.BeanManagerImpl.addContext(BeanManagerImpl.java:375) >> at >> >> org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addContext(AfterBeanDiscoveryImpl.java:153) >> at >> >> org.apache.webbeans.jsf.scopes.Jsf2ScopesExtension.registerViewContext(Jsf2ScopesExtension.java:59) >> ... 34 more >> Caused by: java.lang.ClassNotFoundException: >> javax.faces.bean.ViewScoped >> at >> >> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.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(DefaultClassLoader.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 it, >> > 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 deactivation >> >> 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´m having trouble bootstrapping the CODI environment. I´ve deployed >> the >> >>>> 0.9.5 version of CODI on WebSphere 8 running open webbeans but as the >> 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 >> >>>> >> >>>> >> >>> >> >> >> >>