edillmann / zkspring

Automatically exported from code.google.com/p/zkspring
0 stars 0 forks source link

Eventloop with 3.0-FL-2011-04-07 #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

i tried 3.0-FL-2011-04-07 because i've seen there where changes made to the 
GenericSpringComposer and i tried if they solve my issue from 
http://www.zkoss.org/forum/listComment/15821

But when i try to use my navigation, i get a java.lang.StackOverflowError 
because of an event loop.

i tried to create a short sample that i can attach to this report, but then i 
hit a nullpointer issue (18). When this is solved i can try to make the 
sampler. So long i only can post the stacktrace, maybe this already provides an 
idea what's happening.

What i can see so far:

The navgation is an ul/li/a structure that's created dynamically. the root-ul 
is injected to the composer via the @Autowired annotation. The event is bound 
as 'onClick' to the org.zkoss.html.A element. 
During the "self"-resolve it starts on the A element, goes up to the li and up 
to the (via @Autowired into the componser injected) UL item. From there it 
jumps down to the A element again instead of going up to UL's parent.

Maybe this gives an idea where to search....

i've cut down the stacktrace because it's to long to post it here...

Bye,
   Chris

Please provide any additional information below.

Caused by: java.lang.StackOverflowError
    at org.zkoss.zk.ui.AbstractComponent$AuxInfo.access$500(AbstractComponent.java:3117)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:825)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:838)
    at org.zkoss.spring.impl.ZKProxy$1.getSelf(ZKProxy.java:130)
    at org.zkoss.spring.web.context.request.IdSpaceScope.get(IdSpaceScope.java:50)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
--- loop start
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:653)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:604)
    at org.zkoss.zhtml.Ul$$EnhancerByCGLIB$$cfef56de.getAttribute(<generated>)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.spring.impl.ZKProxy$1.getSelf(ZKProxy.java:130)
    at org.zkoss.spring.web.context.request.IdSpaceScope.get(IdSpaceScope.java:50)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:653)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:604)
    at org.zkoss.zhtml.Ul$$EnhancerByCGLIB$$cfef56de.getAttribute(<generated>)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.spring.impl.ZKProxy$1.getSelf(ZKProxy.java:130)
    at org.zkoss.spring.web.context.request.IdSpaceScope.get(IdSpaceScope.java:50)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
-- loop end
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:653)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:604)
    at org.zkoss.zhtml.Ul$$EnhancerByCGLIB$$cfef56de.getAttribute(<generated>)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.zk.ui.AbstractComponent.getAttribute(AbstractComponent.java:843)
    at org.zkoss.spring.impl.ZKProxy$1.getSelf(ZKProxy.java:130)

Original issue reported on code.google.com by Christia...@gmail.com on 8 Apr 2011 at 3:28

GoogleCodeExporter commented 8 years ago
Hi,

here is the sample code. Sorry for the nullpointer issue, really missed the 
missing "Spring" in GenericSpringComposer.

I just discovered that the Loop starts while trying to add new components 
during event processing. Missed that initially. So it might not be an issue 
during event processing, it seems to be an issue during adding child components 
(maybe only during event processing, haven't checked that out)

Bye,
   chris

Original comment by Christia...@gmail.com on 11 Apr 2011 at 7:15

Attachments: