zkoss / zkcdi Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/zkcdi
Automatically exported from code.google.com/p/zkcdi
What steps will reproduce the problem?
1.
2.
3.
Exception:
in zk 5.0.1 works fine.
Exception:
二月 10, 2012 9:14:25 上午 org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.jboss.weld.environment.servlet.Listener
org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001400 Normal
scoped bean
org.jboss.weld.bean-flat-ProducerMethod-org.zkoss.zkplus.cdi.ZKComponentProducer
Methods.method getguestName() is not proxyable
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:127)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:141)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:331)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:317)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:399)
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Original issue reported on code.google.com by [email protected]
on 10 Feb 2012 at 1:28
Hello,
I tried the smalltalk "Getting started with ZK CDI" with glassfish. I used the
index.zul and the HelloWorld.java as in the Smalltalk.
When i startup glassfish i get the following DeploymentException:
INFO: WEB0671: Loading application at
SCHWERWIEGEND: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: WELD-001408 Injection
point has unsatisfied dependencies. Injection point: field
net.empego.cdi.test.HelloWorld.guestName; Qualifiers:
[@org.zkoss.cdi.inject.ComponentId(value=guestName)]
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:181)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:252)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:360)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:203)
...
Weld tries to resolve the dependencies at startup, but the injected components
are evaluated in the first place when the zul is rendered. I'm not shure how
this should work.
I have an empty beans.xml in WEB-INF:
<beans>
</beans>
I dont have any additional config in web.xml since glassfish v3 supports cdi:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<listener>
<javaee:description>ZK listener for cleanup when a session is destroyed</javaee:description>
<javaee:listener-class>org.zkoss.zk.ui.http.HttpSessionListener</javaee:listener-class>
</listener>
<servlet>
<javaee:description>ZK loader for evaluating ZUML pages</javaee:description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<init-param>
<javaee:param-name>update-uri</javaee:param-name>
<javaee:param-value>/zkau</javaee:param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>/zk/*</url-pattern>
</servlet-mapping>
<servlet>
<javaee:description>The asynchronous update engine for ZK</javaee:description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
<!-- Weld configuration -->
<!-- <listener>-->
<!--
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>-->
<!-- </listener>-->
<!-- <listener>-->
<!--
<listener-class>org.jboss.weld.el.WeldELContextListener</listener-class>-->
<!-- </listener>-->
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jad</extension>
<mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpeg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>js</extension>
<mime-type>application/x-javascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zhtml</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zul</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.zul</welcome-file>
<welcome-file>index.zhtml</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<!-- <resource-env-ref>-->
<!-- <resource-env-ref-name>BeanManager</resource-env-ref-name>-->
<!-- <resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-
env-ref-type>-->
<!-- </resource-env-ref>-->
</web-app>
Original issue reported on code.google.com by [email protected]
on 22 Aug 2010 at 7:20
What steps will reproduce the problem?
1. Deploy zkcdidemo.war on JBoss
What is the expected output? What do you see instead?
Expected successful deployment.
Instead got
Caused by: java.lang.RuntimeException: java.lang.ClassCastException:
org.jboss.weld.BeanManagerImpl cannot be cast to
org.jboss.weld.manager.BeanManagerImpl
at org.zkoss.cdi.weld.spi.ZKWeldExtension.beforeBeanDiscovery(ZKWeldExtension.java:126)
Please use labels and text to provide additional information.
Original issue reported on code.google.com by ashish.dasnurkar
on 9 Jul 2010 at 3:18
What steps will reproduce the problem?
1. Create a web app and deployed to JBoss 7, including zkcdi.jar and a simple
@SessionScoped ZK Composer
2. Make sure there is a beans.xml file somewhere in the META-INF package of
your classpath.
2. Since JBOSS 7 already contains CDI BeanManager, I don't have to configure
one in web.xml. However you get an exception below when you don't.
org.zkoss.xel.XelException: Cannot locate the BeanManager for JavaEE 6
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:525)
org.zkoss.lang.Classes.newInstance(Classes.java:73)
org.zkoss.lang.Exceptions.wrap(Exceptions.java:206)
org.zkoss.xel.XelException$Aide.wrap(XelException.java:47)
org.zkoss.zkplus.cdi.CDIUtil.getBeanManager(CDIUtil.java:44)
org.zkoss.zkplus.cdi.DelegatingVariableResolver.<init>(DelegatingVariableResolver.java:39)
3. If you do add the ff entry, you get another exception
<resource-env-ref>
<resource-env-ref-name>BeanManager</resource-env-ref-name>
<resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
</resource-env-ref>
21:26:59,429 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"C
omposite operation failed and was rolled back. Steps that failed:" => {"Operatio
n step-2" => {"Services with missing/unavailable dependencies" => ["jboss.naming
.context.java.module.\"hims-web-1.0-SNAPSHOT\".\"hims-web-1.0-SNAPSHOT\".env.Bea
nManager missing [ jboss.naming.context.java.module.\"hims-web-1.0-SNAPSHOT\".\"
hims-web-1.0-SNAPSHOT\".BeanManager ]"]}}}
I' using ZK 5.0.9
At this point I've spent too much time fighting ZK and i'm seriously thinking
of going back to JSF.
Original issue reported on code.google.com by [email protected]
on 10 Dec 2011 at 9:44
Is it possible that the jars for zkcdi can be hosted in a publicly accessible
maven repository? As it stands one has to directly put this jar into their m2
repository or upload it into your own repository manager.
Original issue reported on code.google.com by [email protected]
on 7 Dec 2011 at 2:48
is there any richlet support available or planned for ZKCDI?
in my first own approach for a ZK CDI extension i wrote a simple Richlet base
class which does the job. Probably i can use the same approach with ZKCDI:
/**
*
* @author Thomas Müller [email protected]
*/
public abstract class CdiGenericRichlet<T extends CdiGenericRichlet> extends
GenericRichlet {
@Override
/**
* Lookup CDI Beans and inject them in Richlet.
*/
public void init(RichletConfig config) {
super.init(config);
CDIUtils.inject(this);
}
}
CDIUtils.inject():
/**
* Perform injection in obj which is instantiated by the framework but not by CDI.
*
* @param <T>
* @param obj - The instance to inject beans into
*/
public static <T> void inject(Object obj) {
BeanManager beanManager = CDIUtils.getBeanManager();
//CDI uses an AnnotatedType object to read the annotations of a class
AnnotatedType<T> type = (AnnotatedType<T>) beanManager.createAnnotatedType(obj.getClass());
//The extension uses an InjectionTarget to delegate instantiation, dependency injection
//and lifecycle callbacks to the CDI container
InjectionTarget<T> it = beanManager.createInjectionTarget(type);
//each instance needs its own CDI CreationalContext
CreationalContext instanceContext = beanManager.createCreationalContext(null);
it.inject((T) obj, instanceContext); //call initializer methods and perform field injection
it.postConstruct((T) obj); //call the @PostConstruct method
}
Original issue reported on code.google.com by [email protected]
on 22 Aug 2010 at 7:22
reposted from old ZK CDI SF project tracker
https://sourceforge.net/tracker/?func=detail&aid=3025406&group_id=152762&atid=78
5191
Hi,
I can't make zkcdidemo.war run with ZK CE 5.0.3. After upgrading the jars the
app didn't start:
GRAVE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Normal scoped bean
org.jboss.weld.bean-org.zkoss.zkplus.cdi.ZKComponentProducerMethods-ProducerMeth
od-org.zkoss.zkplus.cdi.ZKComponentProducerMethods.gethelloWindow() is not
proxyable
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:183)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:239)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.ja
va:339)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.ja
va:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:3
05)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:3
20)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1
176)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:
83)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRu
nnerImpl.java:1235)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRu
nnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java
:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:17
0)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.
java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53
)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:33
0)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.enterprise.inject.UnproxyableResolutionException: Normal
scoped bean
org.jboss.weld.bean-org.zkoss.zkplus.cdi.ZKComponentProducerMethods-ProducerMeth
od-org.zkoss.zkplus.cdi.ZKComponentProducerMethods.gethelloWindow() is not
proxyable
at org.jboss.weld.Validator.validateBean(Validator.java:85)
at org.jboss.weld.Validator.validateRIBean(Validator.java:100)
at org.jboss.weld.Validator.validateBeans(Validator.java:282)
at org.jboss.weld.Validator.validateDeployment(Validator.java:268)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:389)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:180)
... 30 more
(I'm using Glassfish 3.0.1)
Regards,
Nahuel
Original issue reported on code.google.com by ashish.dasnurkar
on 1 Feb 2011 at 5:32
When using zkcdi.jar with Weld 1.1.0 (weld-servlet-1.1.0.Final.jar) on Tomcat
7, the server complaints that it cannot find the class
org.jboss.weld.context.AbstractMapContext
This is due to the fact that class AbstractMapContext no longer exists in 1.1.0.
I tried to fallback to 1.0.1 of Weld, but there seem to be a ton more issues.
And all the ppl from JBoss are moving on to 1.1.0.
I would sugguest zkcdi-defined contexts to extend a base context class other
than AbstractMapContext?
Original issue reported on code.google.com by [email protected]
on 28 May 2011 at 1:41
What steps will reproduce the problem?
1. Create a project with the default dependencies.
2. Start application server and then deploy application. You get a
noclassdeffound exception in the AbstractMapContext. When you remove the war
and redeploy the error changes to frozen class.That come from javassist which
can't change an already deployed class. If you try to add web-core to bypass
problem of the noclassdef then you get errors regarding the slf4j in jboss.
3. The war is never deployed successfully.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
zkcdi rc 1.0 in jboss 6.0 As final on linux os ubuntu
Please provide any additional information below.
Please find attached the web.xml and pom.xml of my project. Please take into
account that there is no need to register or define something regarding weld in
jboss as 6 since it is embedded into the application server. The week point
that i see is the ZKWeldExtension.
It eithers fail to deploy anything or stacks since javasssist don't allow
reloading same class in jvm for altering.The exception is comming at line
88 of ZKWeldExtension and also from the line 167.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2011 at 11:59
Attachments:
see summary
Original issue reported on code.google.com by [email protected]
on 11 Jun 2012 at 3:15
What steps will reproduce the problem?
1. Create a project with the default dependencies.
2. Start application server and then deploy application. You get a
noclassdeffound exception in the AbstractMapContext. When you remove the war
and redeploy the error changes to frozen class.That come from javassist which
can't change an already deployed class. If you try to add web-core to bypass
problem of the noclassdef then you get errors regarding the slf4j in jboss.
3. The war is never deployed successfully.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
zkcdi rc 1.0 in jboss 6.0 As final on linux os ubuntu
Please provide any additional information below.
Please find attached the web.xml and pom.xml of my project.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2011 at 11:55
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.