spring-webflow icon indicating copy to clipboard operation
spring-webflow copied to clipboard

Facelets ui:debug not working with spring web-flow -> throwing exception [SWF-1131]

Open spring-operator opened this issue 15 years ago • 5 comments

Dominik Dorn opened SWF-1131 and commented

When using facelets to run spring web flow, spring web flow doesn't understand the modifications done to the url by facelets when opening the debug window (CTRL + D) . It throws an exception:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.webflow.execution.repository.BadlyFormattedFlowExecutionKeyException: Badly formatted flow execution key 'e2s1?facelets.ui.DebugOutput=1243863218025', the expected format is 'e<executionId>s<snapshotId>' org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) javax.servlet.http.HttpServlet.service(Unknown Source) javax.servlet.http.HttpServlet.service(Unknown Source)

root cause

org.springframework.webflow.execution.repository.BadlyFormattedFlowExecutionKeyException: Badly formatted flow execution key 'e2s1?facelets.ui.DebugOutput=1243863218025', the expected format is 'e<executionId>s<snapshotId>' org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.parseSnapshotId(AbstractFlowExecutionRepository.java:221) org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.parseFlowExecutionKey(AbstractFlowExecutionRepository.java:120) org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:158) org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) javax.servlet.http.HttpServlet.service(Unknown Source) javax.servlet.http.HttpServlet.service(Unknown Source)

root cause

java.lang.NumberFormatException: For input string: "1?facelets.ui.DebugOutput=1243863218025" java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Integer.parseInt(Integer.java:456) java.lang.Integer.valueOf(Integer.java:553) org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.parseSnapshotId(AbstractFlowExecutionRepository.java:219) org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.parseFlowExecutionKey(AbstractFlowExecutionRepository.java:120) org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:158) org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) javax.servlet.http.HttpServlet.service(Unknown Source) javax.servlet.http.HttpServlet.service(Unknown Source)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

I've attached my sample application.

extract it and build it with maven mvn clean compile package then deploy the war in the target folder to your tomcat.

then browse to http://127.0.0.1:8080/dc-webapp/register/registration-flow then press CTRL+D


Affects: 2.0.7

Attachments:

3 votes, 4 watchers

spring-operator avatar Jun 01 '09 00:06 spring-operator

Dominik Dorn commented

updated version of the maven project, now with complete dependencys etc.

simply unpack

tar zxf bugreport.tar.gz cd dcommunity-swf-test mvn clean compile package

spring-operator avatar Jun 01 '09 03:06 spring-operator

Christopher G. Stach II commented

In case anyone else runs into this, and since https://facelets.dev.java.net/issues/show_bug.cgi?id=312 has gone unfixed for so long, I posted the extensive patch for Facelets over here:

http://datenschwanz.net/2009/12/31/facelets-uidebug-and-spring-web-flow/

This really isn't an SWF bug, unless execution keys are going to be passed around some other way...

spring-operator avatar Dec 31 '09 05:12 spring-operator

Julien HENRY commented

I have the same issue. My workaround is to manually change the offending '?' by a '&' in the debug popup.

spring-operator avatar Oct 13 '10 07:10 spring-operator

Stevo Slavić commented

I'm experiencing something very simillar - when "AdsBot-Google" visits flow page NumberFormatException gets thrown, and in access logs it can be seen that AdsBot-Google was issuing GET with URL that contains two question marks, first followed by SWF's execution parameter, and second one followed by what seems as AdsBot-Google parameters.

spring-operator avatar May 31 '11 07:05 spring-operator

this issue is more than 12 years old.. i couldnt care less.. please close.

domdorn avatar Jan 24 '23 23:01 domdorn