2014-06-13 1 views
0

I webflow에 다음 코드를 가지고는 범위 변수

: payPageProxyUrl 표현식에서 봄 빈으로 정의

<action-state id="blah"> 
    <evaluate result="flowScope.payPageProxyUrl" expression="payPageProxyUrl"/> 

<bean id="payPageProxyUrl" class="java.lang.String"> 
    <constructor-arg value="payPage/Request"/> 
</bean> 

flowScope.payPageProxyUrl을 통한 대부분의 시간이 "payPage/Request"로 올바르게 설정되어있는 것처럼 보이지만 (어떤 경우에는 (웹 로직 클러스터의 다른 JVM)) 나는 아래의 예외 상황에서 "payPageProxyUrl "는 null입니다. 나는 SpEL이 빈에 지속적으로 접근하지 못하고 있다고 생각하지만, 당신의 생각은 무엇이고 어떻게 bean/flow 범위 이름을 변경하지 않고 이것을 막을 수 있습니까? , 문자열 생성자 등을 평가하면 문자열 스프링 빈의 번거 로움을 통해 가고 싶어 왜

org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [[email protected] targetAction = [[email protected] expression = payPageProxyUrl, resultExpression = flowScope.payPageProxyUrl], attributes = map[[empty]]] in state 'blah' of flow 'blah-payment' -- action execution attributes were 'map[[empty]]' 
    at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:60) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE] 

... 

Caused by: java.lang.NullPointerException: null 
    at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:88) ~[spring-expression-3.2.6.RELEASE.jar:3.2.6.RELEASE] 

답변

0

; : 여기

는 예외입니다. 당신은 그냥 세트로 사용할 수 있습니다 :

<action-state id="blah"> 
     <set name="flowScope.payPageProxyUrl" value="'payPage/Request'"/> 
     ... 
    </action-state> 
+0

안녕하세요, 나는 내 코드와 일관성없는 오류가 발생하는 이유와 그것을 피하는 방법을 알고 싶습니다. 레코딩을하면 문제가 사라질 수 있지만 현재 문제를 이해하지 못합니다. – user3738284