Uploaded image for project: 'ZK Spring'
  1. ZK Spring
  2. ZKSPRING-10

Eventloop with 3.0-FL-2011-04-07

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      copied from http://code.google.com/p/zkspring/issues/detail?id=19


      Reported by [email protected] , Apr 8, 2011
      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)


      Comment 1 by [email protected], Apr 11, 2011
      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

            hawk hawk
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: