Re: CDI issue with MyFaces on Glassfish 3.1.1
Hi there, I'm also trying to do that(same steps) but i got another error while deploing my app: Exception while loading the app : org.jboss.weldx.transaction.org$jboss$weld$bean-WEB-INF$lib$myfaces-extcdi-bundle-jsf20-1$0$1-Built-in-UserTransaction_$$_WeldProxy cannot be cast to javassist.util.proxy.ProxyObject java.lang.ClassCastException: org.jboss.weldx.transaction.org$jboss$weld$bean-WEB-INF$lib$myfaces-extcdi-bundle-jsf20-1$0$1-Built-in-UserTransaction_$$_WeldProxy cannot be cast to javassist.util.proxy.ProxyObject at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:250) at org.jboss.weld.bean.builtin.ee.AbstractEEBean.init(AbstractEEBean.java:46) at org.jboss.weld.bean.builtin.ee.UserTransactionBean.init(UserTransactionBean.java:60) at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:199) at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:364) at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:170) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:262) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) im using myfaces 2.1.3, CODI 1.0.1 Primefaces 3.0M4 and Glassfish 3.1.1(also tried in 3.1 and 3.1.2) dependency groupIdorg.apache.myfaces.core/groupId artifactIdmyfaces-api/artifactId version2.1.3/version /dependency dependency groupIdorg.apache.myfaces.core/groupId artifactIdmyfaces-impl/artifactId version2.1.3/version /dependency De: Vytautas Mackonis vytautas.macko...@gmail.com Para: users@myfaces.apache.org Enviadas: Domingo, 6 de Novembro de 2011 20:21 Assunto: CDI issue with MyFaces on Glassfish 3.1.1 Hi everyone, Ive been trying to override Mojarra with Myfaces on a Glassfish server. I managed to do it by: - adding a maven dependency: dependency groupIdorg.apache.myfaces.core/groupId artifactIdmyfaces-impl/artifactId version2.1.3/version /dependency - modifying glassfish-web.xml: glassfish-web-app error-url= context-root/TestApp-1.0-SNAPSHOT/context-root jsp-config property name=keepgenerated value=true descriptionKeep a copy of the generated servlet class' java code./description /property /jsp-config class-loader delegate=false/ property name=useBundledJsf value=true/ /glassfish-web-app After these steps the application deployed fine and from server logs i can tell that MyFaces are indeed used instead of Mojarra. However, the backing beans are not injected into views. I get the following error on form submit: org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'calculatorBean' resolved to null If I do the backing bean configuration in faces-config.xml instead of just tossing @Named @RequestScoped on the bean class then the following error does not occur. So I assume my problem is CDI related. Have I missed something in the initial setup of my web application to enable CDI? By the way, here is a full stack trace of the error: org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'calculatorBean' resolved to null at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getType(ContextAwareTagValueExpression.java:77) at org.apache.myfaces.shared.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:77) at org.apache.myfaces.shared.renderkit.RendererUtils.findUIOutputConverter(RendererUtils.java:411) at org.apache.myfaces.shared.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:804) at org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.getConvertedValue(HtmlTextRendererBase.java:311) at javax.faces.component.UIInput.getConvertedValue(UIInput.java:623) at javax.faces.component.UIInput.validate(UIInput.java:555) at javax.faces.component.UIInput.processValidators(UIInput.java:246) at javax.faces.component.UIForm.processValidators(UIForm.java:168) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1238) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1238) at javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1330) at javax.faces.component.UIViewRoot.access$500(UIViewRoot.java:75) at
OWB Decorator problem
Hello there! I have a problem with OWB that does not occur on WELD and I wasn't able to find a solution for that yet. I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like this: class A implements Service{} class ADecorator implements Service{} class InterceptorImpl{} Now I call a method of the Service interface and the call is delegated to the decorator as expected. The decorator passes the call to the underlying implementation and the impl throws an exception. Now the decorator does not see the concrete exception that occurred in the impl but an InvocationTargetException and within that, the actual exception. Am I wrong or should I see the actual exception and not the InvocationTargetException? I can't even add an Interceptor to the decorator methods to generically unwrap that exception, because AroundInvoke interceptors are not called if they are applied on decorators. Is that the expected behavior too? Thanks in advance! Regards, Christian
Re: OWB Decorator problem
hi Christian! guess this was meant for u...@openwebbeans.apache.org? :) LieGrue, strub - Original Message - From: Christian Beikov christian.bei...@gmail.com To: users@myfaces.apache.org Cc: Sent: Monday, November 7, 2011 7:16 PM Subject: OWB Decorator problem Hello there! I have a problem with OWB that does not occur on WELD and I wasn't able to find a solution for that yet. I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like this: class A implements Service{} class ADecorator implements Service{} class InterceptorImpl{} Now I call a method of the Service interface and the call is delegated to the decorator as expected. The decorator passes the call to the underlying implementation and the impl throws an exception. Now the decorator does not see the concrete exception that occurred in the impl but an InvocationTargetException and within that, the actual exception. Am I wrong or should I see the actual exception and not the InvocationTargetException? I can't even add an Interceptor to the decorator methods to generically unwrap that exception, because AroundInvoke interceptors are not called if they are applied on decorators. Is that the expected behavior too? Thanks in advance! Regards, Christian
Re: OWB Decorator problem
Am 07.11.2011 20:33, schrieb Mark Struberg: hi Christian! guess this was meant for u...@openwebbeans.apache.org? :) LieGrue, strub - Original Message - From: Christian Beikovchristian.bei...@gmail.com To: users@myfaces.apache.org Cc: Sent: Monday, November 7, 2011 7:16 PM Subject: OWB Decorator problem Hello there! I have a problem with OWB that does not occur on WELD and I wasn't able to find a solution for that yet. I am using OWB 1.0 shipped with IBM WAS 8.0.0.1 and the scenario is like this: class A implements Service{} class ADecorator implements Service{} class InterceptorImpl{} Now I call a method of the Service interface and the call is delegated to the decorator as expected. The decorator passes the call to the underlying implementation and the impl throws an exception. Now the decorator does not see the concrete exception that occurred in the impl but an InvocationTargetException and within that, the actual exception. Am I wrong or should I see the actual exception and not the InvocationTargetException? I can't even add an Interceptor to the decorator methods to generically unwrap that exception, because AroundInvoke interceptors are not called if they are applied on decorators. Is that the expected behavior too? Thanks in advance! Regards, Christian Oh yeah, sorry for that ;-) Regards, Christian
JSF 2: t:saveState
Hi, I'm starting a new project with JSF 2. Can I replace the t:saveState with some scope? I need keep an object through pages. Thanks, Rafael Santini