Thanks, Dan - I will try this the next days.<br><br>So commenting out <cite class="quote"><listener><listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class></listener> in web.xml is just fine, technically?</cite><br>
<br><br>Thanks<br>Michael<br><br><br><div class="gmail_quote">2011/1/4 Dan Allen <span dir="ltr"><<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Michael,<div><br></div><div>To use MyFaces on JBoss AS 6, you need to provide a hint as described here:</div><div><br></div><div><a href="http://community.jboss.org/wiki/JSFonJBossAS6" target="_blank">http://community.jboss.org/wiki/JSFonJBossAS6</a></div>
<div><br></div><div>Feel free to propagate that information.</div><div><br></div><div><font color="#888888"><a href="http://community.jboss.org/wiki/JSFonJBossAS6" target="_blank"></a>-Dan</font><div><div></div><div class="h5">
<br><br><div class="gmail_quote">On Mon, Jan 3, 2011 at 6:48 PM, Michael Schütz <span dir="ltr"><<a href="mailto:michaelschuetz83@gmail.com" target="_blank">michaelschuetz83@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">This is interesting:<br><br>As recommended, I did only keep myfaces-extcdi-* jars.<br><br>This resulted in:<br>
Error configuring application listener of class org.apache.webbeans.servlet.WebBeansConfigurationListener: java.lang.ClassNotFoundException: org.apache.webbeans.servlet.WebBeansConfigurationListener<br>
Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener: java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener<br><br>WebBeansConfigurationListener is contained in openwebbeans-web-1.0.0.jar and StartupServletContextListener in myfaces-impl-2.0.3.jar.<br>
<br>So I did comment out Listener in web.xml:<br> <!-- <br> <listener><br> <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class><br> </listener><br><br>
<listener><br> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class><br> </listener><br> --><br> <br>After that server starts fine, using Mojarra 2.0.3.<br>
Applications works partially as expected:<br>* JSF2 RequestScope does work as expected<br>* JSF2 ViewScope does _not_ work: it seems not to be initialized<br>* CODI Conversation and CODI Window-Scope do work as expected<br>
* CODI ViewAccessScoped does _not_ work as expected: it has been initialized, but never expires<br><br>Not commenting out <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> causes:<br>
class org.apache.myfaces.webapp.StartupServletContextListener: java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener<br><br>This is quite strange, as this class is provided in myfaces-impl-2.0.1.jar shipped with AS. Seems to be a classloading issue - right?<br>
<br>So, are this still project configuration troubles: wrong Listener used etc? Or is it more likely to be a bug?<br><br><br>Thanks a lot<br>Michael<br><br><div class="gmail_quote">2011/1/3 Mark Struberg <span dir="ltr"><<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>Hi Michael!<br>
<br>
What definitely needs to be removed:<br>
<br>
* geronimo-*_spec (all the specs are already included in JBOSS)<br>
* jsr250-api<br>
* openwebbeans*<br>
* scannotation<br>
* myfaces-impl<br>
* myfaces-api<br>
<br>
you should also be able to remove all the commons stuff...<br>
<br>
<br>
The only things you need are basically the myfaces-extcdi-* jars.<br>
<br>
LieGrue,<br>
strub<br>
<br>
<br>
--- On Mon, 1/3/11, Michael Schütz <<a href="mailto:michaelschuetz83@gmail.com" target="_blank">michaelschuetz83@gmail.com</a>> wrote:<br>
<br>
From: Michael Schütz <<a href="mailto:michaelschuetz83@gmail.com" target="_blank">michaelschuetz83@gmail.com</a>><br>
Subject: Re: [weld-dev] CODI and JBoss AS 6 final: ProjectStageActivationExtension didn't implement the Extension interface<br>
To: "Peter Muir" <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
Cc: "<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a>" <<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a>><br>
Date: Monday, January 3, 2011, 10:34 AM<br>
<br>
Pete, I already did that: I did remove geronimo-jcdi and javassist.<br>
<br>
Current error:<br>
11:19:22,486 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///C:/01-Development/Projekte/CODI/jboss-6.0.0.Final/server/default/deploy/myfaces-cdi-1.0.2-SNAPSHOT.war_WeldBoo<br>
<br>
n: WELD-001409 Ambiguous dependencies for type [MessageContext] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Produces @Dependent @Jsf @Named public org.apache.myfaces.extensions.cdi.jsf.impl.message.Jsf<br>
<br>
ssageFactory>, Instance<ELProvider>, Instance<ArgumentFilter>)]. Possible dependencies [[Producer Method [MessageContext] with qualifiers [@Any @Default] declared as [[method] @Produces @Dependent @Jsf @Named public org.apache.myfa<br>
<br>
eateContext(MessageContext, Instance<MessageFactory>, Instance<ELProvider>, Instance<ArgumentFilter>)], Managed Bean [class org.apache.myfaces.extensions.cdi.message.impl.DefaultMessageContext] with qualifiers [@Any @Default]]]<br>
<br>
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:309) [:6.0.0.Final]<br>
<br>
<br>
Please find screenshot attached with current WEB-INF/lib directory.<br>
Are you saying removing everything but myfaces-extcdi-*.jar is expected to work?<br>
<br>
<br>
<br>
Thanks<br>
Michael <br>
<br>
<br>
2011/1/3 Peter Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
<br>
Do what I said and remove javassist.<br>
<br>
--Pete Muirhttp://<a href="http://in.relation.to/Bloggers/Pete" target="_blank">in.relation.to/Bloggers/Pete</a><br>
<br>
On 2 Jan 2011, at 22:34, Michael Schütz <<a href="mailto:michaelschuetz83@gmail.com" target="_blank">michaelschuetz83@gmail.com</a>> wrote:<br>
<br>
<br>
Thanks Dan and Pete for your replys.<br>
<br>
I did remove geronimo-jcdi and got:<br>
23:14:08,172 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///C:/01-Development/Projekte/CODI/jboss-6.0.0.Final/server/default/deploy/myfaces-cdi-1.0.2-SNAPSHOT.war_WeldBootstrapBean state=Create: java.lang.ClassCastException: org.jboss.weld<br>
<br>
<br>
.<a href="http://security.org" target="_blank">security.org</a>$jboss$weld$bean-jboss$classloader:id="vfs:$$$C:$01-Development$Projekte$CODI$jboss-6$0$0$Final$server$default$deploy$myfaces-cdi-1$0$2-SNAPSHOT$war"-Built-in-Principal_$$_WeldProxy cannot be cast to javassist.util.proxy.ProxyObject<br>
<br>
<br>
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:248) [:6.0.0.Final]<br>
at org.jboss.weld.bean.builtin.ee.AbstractEEBean.<init>(AbstractEEBean.java:46) [:6.0.0.Final]<br>
<br>
So, I removed javassist in the next step and i got:<br>
<br>
<br>
23:17:31,816 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///C:/01-Development/Projekte/CODI/jboss-6.0.0.Final/server/default/deploy/myfaces-cdi-1.0.2-SNAPSHOT.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentExceptio<br>
<br>
<br>
n: WELD-001409 Ambiguous dependencies for type [MessageContext] with qualifiers [@Default] at injection point [[parameter 1] of [method] @Produces @Dependent @Jsf @Named public org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageContextProducer.createContext(MessageContext, Instance<Me<br>
<br>
<br>
ssageFactory>, Instance<ELProvider>, Instance<ArgumentFilter>)]. Possible dependencies [[Producer Method [MessageContext] with qualifiers [@Any @Default] declared as [[method] @Produces @Dependent @Jsf @Named public <a href="http://org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageContextProducer.cr" target="_blank">org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageContextProducer.cr</a><br>
<br>
<br>
eateContext(MessageContext, Instance<MessageFactory>, Instance<ELProvider>, Instance<ArgumentFilter>)], Managed Bean [class org.apache.myfaces.extensions.cdi.message.impl.DefaultMessageContext] with qualifiers [@Any @Default]]]<br>
<br>
<br>
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:309) [:6.0.0.Final]<br>
<br>
Seams like myfaces-extcdi-message-module-impl-0.9.1.jar causes the troubles. Any thoughts what needs to be done?<br>
<br>
<br>
<br>
<br>
Thanks<br>
Michael<br>
<br>
<br>
2011/1/1 Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
<br>
<br>
<br>
<br>
On 31 Dec 2010, at 17:39, Dan Allen wrote:<br>
<br>
<br>
<br>
> It's more than likely geronimo-jcdi jar that's causing the problem. Weld looks to see if Extension class equals Extension class and since there are two independent instances on the classpath, it breaks the comparison. 9/10 this is the source of a class not found problem.<br>
<br>
<br>
<br>
><br>
<br>
> Java EE APIs should never be provided by an archive when deploying to a compliant app server. If you were moving from Tomcat to JBoss AS it's important to keep that in mind.<br>
<br>
><br>
<br>
> I doubt the apache-commons libraries would present a problem, so you can likely leave those.<br>
<br>
<br>
<br>
They (used to at least) cause problems with RichFaces.<br>
<br>
<br>
<br>
In general until AS7 I would recommend not duplicating libs in your war that in the AS, it will cause you a lot less problems in the long run :-D<br>
<br>
<br>
<br>
<br>
<br>
><br>
<br>
> -Dan<br>
<br>
><br>
<br>
> On Fri, Dec 31, 2010 at 11:00 AM, Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>> wrote:<br>
<br>
<br>
> Aha, as I thought you are bundling in the war all sorts of stuff which AS6 provides (and doesn't support overriding simply by placing in the war).<br>
<br>
><br>
<br>
> Try removing at least:<br>
<br>
><br>
<br>
> * geronimo*<br>
<br>
> * javassist<br>
<br>
> * jsr250-api<br>
<br>
> * myfaces-api<br>
<br>
> * myfaces-impl<br>
<br>
> * openwebbeans*<br>
<br>
> * scannotation<br>
<br>
><br>
<br>
> you may also need to remove commons-XXX which duplicate that in the AS<br>
<br>
><br>
<br>
> HTH<br>
<br>
><br>
<br>
><br>
<br>
> On 31 Dec 2010, at 15:42, Michael Schütz wrote:<br>
<br>
><br>
<br>
> > Please see attached screenshot.<br>
<br>
> ><br>
<br>
> > Thanks<br>
<br>
> > Michael<br>
<br>
> ><br>
<br>
> > 2010/12/31 Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
<br>
<br>
> > No idea.<br>
<br>
> ><br>
<br>
> > What jars are placed in WEB-INF/lib?<br>
<br>
> ><br>
<br>
> > On 31 Dec 2010, at 15:19, Michael Schütz wrote:<br>
<br>
> ><br>
<br>
> > > Thanks for reply, Pete.<br>
<br>
> > ><br>
<br>
> > > Already spoke to CODI team. They do implement Extension. Doesn't look like CODI bug for them.<br>
<br>
> > ><br>
<br>
> > > So, does this CDI POM config look strange:<br>
<br>
> > > <!-- MyFaces CODI --><br>
<br>
> > > <dependency><br>
<br>
> > > <groupId>org.apache.myfaces.extensions.cdi.core</groupId><br>
<br>
> > > <artifactId>myfaces-extcdi-core-api</artifactId><br>
<br>
> > > <version>${myfaces_codi.version}</version><br>
<br>
> > > <scope>compile</scope><br>
<br>
> > > </dependency><br>
<br>
> > ><br>
<br>
> > > <dependency><br>
<br>
> > > <groupId>org.apache.myfaces.extensions.cdi.core</groupId><br>
<br>
> > > <artifactId>myfaces-extcdi-core-impl</artifactId><br>
<br>
> > > <version>${myfaces_codi.version}</version><br>
<br>
> > > <scope>runtime</scope><br>
<br>
> > > </dependency><br>
<br>
> > > <dependency><br>
<br>
> > > <groupId>org.apache.myfaces.extensions.cdi.modules</groupId><br>
<br>
> > > <artifactId>myfaces-extcdi-jsf20-module-api</artifactId><br>
<br>
> > > <version>${myfaces_codi.version}</version><br>
<br>
> > > <scope>compile</scope><br>
<br>
> > > </dependency><br>
<br>
> > ><br>
<br>
> > > <dependency><br>
<br>
> > > <groupId>org.apache.myfaces.extensions.cdi.modules</groupId><br>
<br>
> > > <artifactId>myfaces-extcdi-jsf20-module-impl</artifactId><br>
<br>
> > > <version>${myfaces_codi.version}</version><br>
<br>
> > > <scope>runtime</scope><br>
<br>
> > > </dependency><br>
<br>
> > ><br>
<br>
> > ><br>
<br>
> > > Cheers<br>
<br>
> > > Michael<br>
<br>
> > ><br>
<br>
> > > 2010/12/31 Pete Muir <<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>><br>
<br>
<br>
> > ><br>
<br>
> > > On 31 Dec 2010, at 14:37, Michael Schütz wrote:<br>
<br>
> > ><br>
<br>
> > > > Hi to all,<br>
<br>
> > > ><br>
<br>
> > > > would like to run CODI/MyFaces example within JBoss AS 6 final.<br>
<br>
> > > > Getting:<br>
<br>
> > > > WeldBootstrapBean state=Create: java.lang.RuntimeException: Service class or<br>
<br>
> > > > g.apache.myfaces.extensions.cdi.core.impl.projectstage.ProjectStageActivationExtension didn't implement the Extension interface<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.util.ServiceLoader.loadClass(ServiceLoader.java:261) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:233) [:6.0.0.Final]<br>
<br>
> > > > at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:194) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:157) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:346) [:6.0.0.Final]<br>
<br>
> > > > at org.jboss.weld.bootstrap.ExtensionBeanDeployer.addExtensions(ExtensionBeanDeployer.java:93) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:333) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.0.0.Final]<br>
<br>
> > > ><br>
<br>
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br>
<br>
> > > ><br>
<br>
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br>
<br>
> > > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br>
<br>
> > > ><br>
<br>
> > > > Everything runs fine within Tomcat7.<br>
<br>
> > > ><br>
<br>
> > > > Already posted question at Weld forum without having much success: <a href="http://seamframework.org/Community/CODIAndJBossAS6FinalProjectStageActivationExtensionDidntImplementTheExtensionInterface" target="_blank">http://seamframework.org/Community/CODIAndJBossAS6FinalProjectStageActivationExtensionDidntImplementTheExtensionInterface</a><br>
<br>
<br>
<br>
> > > ><br>
<br>
> > > > What I would like to know:<br>
<br>
> > > > 1) Is it not supposed to run?<br>
<br>
> > ><br>
<br>
> > > I would guess it is, but you should check with the CODI team.<br>
<br>
> > ><br>
<br>
> > > > 2) Is it project configuration issue?<br>
<br>
> > ><br>
<br>
> > > Possibly, it looks like it does really impl Extension so check you aren't bundling the CDI API in your war accidentally.<br>
<br>
> > ><br>
<br>
> > > > 3) Is it a bug? (JBoss, Weld? JIRA issue already filed)<br>
<br>
> > ><br>
<br>
> > > Probably not in JBoss or Weld.<br>
<br>
> > ><br>
<br>
> > > ><br>
<br>
> > > ><br>
<br>
> > > > thanks a lot<br>
<br>
> > > > Michael<br>
<br>
> > > > _______________________________________________<br>
<br>
> > > > weld-dev mailing list<br>
<br>
> > > > <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<br>
<br>
> > > > <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
> > ><br>
<br>
> > ><br>
<br>
> > > _______________________________________________<br>
<br>
> > > weld-dev mailing list<br>
<br>
> > > <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<br>
<br>
> > > <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
> ><br>
<br>
> ><br>
<br>
> > <codi_webinf_lib.png><br>
<br>
><br>
<br>
><br>
<br>
> _______________________________________________<br>
<br>
> weld-dev mailing list<br>
<br>
> <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<br>
> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
><br>
<br>
><br>
<br>
><br>
<br>
> --<br>
<br>
> Dan Allen<br>
<br>
> Principal Software Engineer, Red Hat | Author of Seam in Action<br>
<br>
> Registered Linux User #231597<br>
<br>
><br>
<br>
> <a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<br>
> <a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<br>
<br>
> <a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
<br>
<br>
> _______________________________________________<br>
<br>
> weld-dev mailing list<br>
<br>
> <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<br>
> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
<br>
weld-dev mailing list<br>
<br>
<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-----Inline Attachment Follows-----<br>
<br>
_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
<br>
<br>
</div></div></blockquote></div></div></div><br>
<br>_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>
Registered Linux User #231597<br><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
</div></div></div>
</blockquote></div><br>