Jan 11th, 2007, 04:23 PM
getFlowScope() cannot be accessed error with JDK 1.4 and Tomcat 5.0
The error is caused from here (in red):
<bean-action bean="attachmentFormService" method="getFormType">
<transition on="new" to="newAttachmentForm"/>
<transition on="search" to="searchAttachmentListForm"/>
The error log:
2007-01-11 16:59:14 StandardWrapperValve[attachmentflow]: Servlet.service() for servlet attachmentflow threw exception
ognl.OgnlException: flowScope [java.lang.IllegalAccessException: Method [public org.springframework.webflow.core.collection.Mutabl eAttributeMap org.springfra
mework.webflow.engine.impl.RequestControlContextIm pl.getFlowScope()] cannot be accessed.]
I want to deploy the app to Tomcat 5.0 using JDK1.4, but it doesn't work. However, if I deploy the same war on Tomcat 5.5 with JDK1.5, it works perfectly.
Based on the posting here, SWF should work on JDK1.4. Initially, I had the warning on concurrent locking, but after including the backport_util_concurrent.jar, the warning message goes away, but still getting this error. Not sure if they are related.
I have tried to use request, flash scopes instead, the error remains and is identical, apart from it says getReqestScope() or getFlashScope() cannot be accessed.
It seems that the scopes cannot be accessed concurrently? Or am I missing something very simple here?
Would the differences in the common/lib for the two tomcat 5.0/5.5 servers make any difference? Or it is simply a JDK1.4/1.4 compatibility bug?
More detailed log:
Exception thrown executing [AnnotatedAction@12130d1 targetAction = org.springframework.webflow.action.LocalBeanInvoki ngAction@1e2e2f4, attributes = map[[empty]]] in state 'selectForm' of flow 'attachmentflow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.expression.EvaluationE xception: Expression [EvaluationAttempt@2096d7 expression = flowScope.attachmentFormBean, target = [RequestControlContextImpl@18f12dc externalContext = [ServletExternalContext@1f4b24 requestParameterMap = map['_eventId' -> 'submit', 'sumbit.y' -> '0', 'sumbit.x' -> '51', '_flowExecutionKey' -> '_c5A385973-D2D6-D51A-E5CE-84A2C5435C69_kEE3629F5-3A0C-995F-617C-9BC6E1A2EDFB', 'formType' -> 'new']], requestScope = map[[empty]], attributes = map[[empty]], flowExecution = [FlowExecutionImpl@1f8f72f flow = 'attachmentflow', flowSessions = list[[FlowSessionImpl@2c507f flow = 'attachmentflow', state = 'selectForm', scope = map['user' -> 'kanal', 'currentFormObject' -> com.ms.mscibarra.misswift.attachment.command.Attac hmentFormBean@158e2c3, 'attachmentFormBean' -> com.ms.mscibarra.misswift.attachment.command.Attac hmentFormBean@158e2c3, 'previousViewStateId' -> 'selectTypeForm', 'GLOBAL_BACK_LISTENER_VIEW_STATES' -> list['selectTypeForm']], flashMap = map['org.springframework.validation.BindException.curr entFormObject' -> org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBinding Result: 0 errors, 'org.springframework.validation.BindException.atta chmentFormBean' -> org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBinding Result: 0 errors], status = Active]]]], context = [null]] failed - make sure the expression is evaluatable on the target object; nested exception is ognl.OgnlException: flowScope [java.lang.IllegalAccessException: Method [public org.springframework.webflow.core.collection.Mutabl eAttributeMap org.springframework.webflow.engine.impl.RequestCon trolContextImpl.getFlowScope()] cannot be accessed.]
Jan 12th, 2007, 03:51 AM
An update on progress troubleshooting
Downloaded tomcat 5.0 and JDK1.4 on local machine, and the app works fine.
So, it is not the issue. Must be the production tomcat server has some environment and common lib that is causing this error!
Will update back once it is solved........
Jan 15th, 2007, 05:38 AM
Strange. Method argument expressions are evaluated against the RequestContext, so the above expression should work.
Make sure the production server is not using some bizar version of ognl.jar. OGNL is the expression language used by SWF.
Last edited by klr8; Jan 15th, 2007 at 05:42 AM.
Mar 2nd, 2007, 03:45 AM
Got the same problem here. It works on my tomcat 5.5.20 installation but NOT on my Sun web application server 8.2.
Mar 2nd, 2007, 03:48 AM
I gave up at the end, and avoided using the feature all together - a little pointless using SWF afterall - however, we are upgrading tomcat 5 to 5.5 soon, so we are OK.
Mar 2nd, 2007, 03:51 AM
hmm, We develop in Tomcat 5.5 and the production server is a Sun applicationserver 8.2, so ill have look if i can fix this. I f I can, i will Post the solution here
- update: It looks like it's going wrong with older versions of web application servers. It goes wrong with Tomcat5 and it goes wrong with SJAS 8.2, but works on tomcat 5.5, any ideas why this is ?
Last edited by jeroenvandepol; Mar 2nd, 2007 at 06:03 AM.