Announcement Announcement Module
Collapse
No announcement yet.
Stack Overflow in Spring DefaultValueStyler using Spring Web Flow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stack Overflow in Spring DefaultValueStyler using Spring Web Flow

    Hi,
    I am getting a stack overflow error in Spring Web Flow when the attributemapper contains an object which implements the Map interface which has a cyclical relationship with another object also implementing the Map interface. The stack overflow trace starts in a log.debug statement in Spring Web Flow:
    logger.debug("Activating new session for flow '" + flow.getId() + "' in state '"
    + flow.getStartState().getId() + "' with input " + input);

    The input is a LocalAttributeMap. The toString of input ends up in the Spring DefaultValueStyler which (afaics) is not able to handle cyclical relations.

    I put a breakpoint to show the start of the stacktrace. Below you can find the the start of the stacktrace resulting in a stack overflow, further below you can find the end (ending in a stack overflow).

    Is there a way for me to prevent this. Is there a mode in which the DefaultValueStyyler can be run so that it prevents infinite looping?

    Thanks for any response on this.

    gr. Martin

    >>>> Start of stack overflow stack trace:
    EcoreDynamicObject.entrySet() line: 268
    DefaultValueStyler.visit(Map) line: 78
    GeneratedMethodAccessor69.invoke(Object, Object[]) line: not available
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object...) line: 585
    ReflectiveVisitorHelper.invokeVisit(Object, Object) line: 97
    DefaultValueStyler.style(Object) line: 56
    DefaultValueStyler.visit(Map$Entry) line: 93
    GeneratedMethodAccessor73.invoke(Object, Object[]) line: not available
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object...) line: 585
    ReflectiveVisitorHelper.invokeVisit(Object, Object) line: 97
    DefaultValueStyler.style(Object) line: 56
    DefaultValueStyler.visit(Map) line: 80
    GeneratedMethodAccessor69.invoke(Object, Object[]) line: not available
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object...) line: 585
    ReflectiveVisitorHelper.invokeVisit(Object, Object) line: 97
    DefaultValueStyler.style(Object) line: 56
    StylerUtils.style(Object) line: 47
    LocalAttributeMap.toString() line: 316
    String.valueOf(Object) line: 2577
    StringBuffer.append(Object) line: 220
    RequestControlContextImpl.start(Flow, MutableAttributeMap) line: 190
    SubflowState.doEnter(RequestControlContext) line: 120
    SubflowState(State).enter(RequestControlContext) line: 200
    Transition.execute(State, RequestControlContext) line: 229
    ViewState(TransitionableState).onEvent(RequestCont rolContext) line: 112
    Flow.onEvent(RequestControlContext) line: 572
    RequestControlContextImpl.signalEvent(Event) line: 208
    FlowExecutionImpl.signalEvent(String, ExternalContext) line: 217
    FlowNavigationHandler.handleNavigation(FacesContex t, String, String, NavigationHandler) line: 184
    FlowNavigationHandler(DecoratingNavigationHandler) .handleNavigation(FacesContext, String, String) line: 72
    ActionListenerImpl.processAction(ActionEvent) line: 119
    HtmlCommandLink(UICommand).broadcast(FacesEvent) line: 383
    HtmlDataTable(UIDataAdaptor).broadcast(FacesEvent) line: 1172
    AjaxViewRoot.processEvents(Buffer, boolean) line: 186
    AjaxViewRoot.broadcastEvents(FacesContext, PhaseId) line: 164
    AjaxViewRoot.processDecodes(FacesContext) line: 280
    ApplyRequestValuesPhase.execute(FacesContext) line: 101
    LifecycleImpl.phase(PhaseId, Phase, FacesContext) line: 251
    LifecycleImpl.execute(FacesContext) line: 117
    FacesServlet.service(ServletRequest, ServletResponse) line: 244
    ApplicationFilterChain.internalDoFilter(ServletReq uest, ServletResponse) line: 290
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
    ExtensionsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 100
    ApplicationFilterChain.internalDoFilter(ServletReq uest, ServletResponse) line: 235
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
    ConfigurableXMLFilter(BaseXMLFilter).doXmlFilter(F ilterChain, HttpServletRequest, HttpServletResponse) line: 141
    Filter(BaseFilter).doFilter(ServletRequest, ServletResponse, FilterChain) line: 281
    ApplicationFilterChain.internalDoFilter(ServletReq uest, ServletResponse) line: 235
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
    ExtensionsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 147
    ApplicationFilterChain.internalDoFilter(ServletReq uest, ServletResponse) line: 235
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
    FlowSystemCleanupFilter.doFilterInternal(HttpServl etRequest, HttpServletResponse, FilterChain) line: 41
    FlowSystemCleanupFilter(OncePerRequestFilter).doFi lter(ServletRequest, ServletResponse, FilterChain) line: 75
    ApplicationFilterChain.internalDoFilter(ServletReq uest, ServletResponse) line: 235
    ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
    StandardWrapperValve.invoke(Request, Response) line: 230
    StandardContextValve.invoke(Request, Response) line: 175
    StandardHostValve.invoke(Request, Response) line: 128
    ErrorReportValve.invoke(Request, Response) line: 104
    StandardEngineValve.invoke(Request, Response) line: 109
    CoyoteAdapter.service(Request, Response) line: 261
    Http11Processor.process(Socket) line: 844
    Http11Protocol$Http11ConnectionHandler.process(Soc ket) line: 581
    JIoEndpoint$Worker.run() line: 447
    Thread.run() line: 595


    >>> Last part of the stack overflow:

    java.lang.StackOverflowError
    java.lang.Integer.toString(Integer.java:303)
    java.lang.Integer.toString(Integer.java:116)
    java.lang.String.valueOf(String.java:2682)
    java.lang.Integer.toString(Integer.java:682)
    java.lang.String.valueOf(String.java:2577)
    org.springframework.core.style.DefaultValueStyler. visit(DefaultValueStyler.java:64)
    sun.reflect.GeneratedMethodAccessor75.invoke(Unkno wn Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.springframework.core.ReflectiveVisitorHelper.i nvokeVisit(ReflectiveVisitorHelper.java:97)
    org.springframework.core.style.DefaultValueStyler. style(DefaultValueStyler.java:56)
    org.springframework.core.style.DefaultValueStyler. visit(DefaultValueStyler.java:93)
    sun.reflect.GeneratedMethodAccessor73.invoke(Unkno wn Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.springframework.core.ReflectiveVisitorHelper.i nvokeVisit(ReflectiveVisitorHelper.java:97)
Working...
X