-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello everyone,
I am trying to use ZK CDI extension. Everything works fine except for ZK component injection.
I have a controller in Java bean which extends org.zkoss.cdi.util.GenericComposer. There I try to inject ZK component using:
@Inject @ComponentId("username") Textbox username;
but I always get one of these two exceptions:
1)
WELD-001409 Injection point has ambiguous dependencies ...
It is interesting, that the two possible dependencies are exactly the same.
2)
WELD-001400 Normal scoped bean org.jboss.weld.bean-flat-ProducerMethod-org.zkoss.zkplus.cdi.ZKComponentProducerMethods.method [method name] is not proxyable
I am using ZK 5.0.4, Java EE 5/6, Glassfish/Tomcat.
Does anyone know where the problem is and how to solve it? Any help is really appreciated.
Thank you!
---------------------------------------
My second question is concerning ZK CDI as well.
Is there any advantage of extending controller class with org.zkoss.cdi.util.GenericComposer instead of org.zkoss.zk.ui.util.GenericForwardComposer? The only one I know about is that with org.zkoss.cdi.util.GenericComposer I can name my methods freely and more comprehensibly - I am not bound with naming rules given by org.zkoss.zk.ui.util.GenericForwardComposer (for example onClick$myButton).
But are there any other differences which influence perfomance and so on?
Thank you for your answers!
Best regards,
Petr
In my case,
i'm using weld 1.1Beta2 and ZK 5.05 on tomcat and i'm trying to reproduce the example in http://docs.zkoss.org/wiki/Getting_started_with_ZK_CDI
When i start tomcat i always get this ERROR message.
org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001437 Normal scoped bean class org.zkoss.zk.ui.AbstractComponent is not proxyable because the type is final or it contains a final method final void org.zkoss.zk.ui.AbstractComponent.replaceWith(org.zkoss.zk.ui.AbstractComponent,boolean,boolean).
Any idea to solve it?
Yes, you are right, I get only the second exception (WELD-001400) in Tomcat. But in Glassfish both of them occur.
hi ashishd,
i tried to debug this in glassfish and you are right... it seems impossible. But glassfish is the reference implementation for Java EE6 and it would be very good to get ZKCDI up and running.
I checked out the code for CKCDI and played around with it, but i could not get it up and running. With the zkcdi jar GF started without errors, but injection does not happen. It would be very nice to provide ZKCDI as a maven Projekt.
I havent tried it in Tomcat yet.
/thomas
Hi petrslavotinek & oberinspector,
>>WELD-001409 Injection point has ambiguous dependencies ...
seems to be a class loading problem on Glassfish which is near impossible to debug but I'll try. Are you sure it is also occurring in Tomcat 6?
>>Is there any advantage of extending controller class with org.zkoss.cdi.util.GenericComposer instead of org.zkoss.zk.ui.util.GenericForwardComposer?
org.zkoss.cdi.util.GenericComposer uses CDI event notification model for defining & wiring of events so its performance depends on how CDI is implemented by the underlying Java EE 6 container.
i also had some simular problems with glassfish and was asked to write issues: http://code.google.com/p/zkcdi/issues/list. There seems to be not much activity with ZKCDI at the moment. I tried several things with glassfish and zkcdi, but did not get it up and running.
Some things i would like to see from ZKCDI is injekt components and EJBs in a Composer and injekt components and EJBs in a richlet with glassfish.
/thomas
Asked: 2010-09-12 11:24:38 +0800
Seen: 595 times
Last updated: Nov 11 '10