使用Spring Webflow 1.0的项目迁移到Java 8时出现的问题

时间:2015-08-20 14:05:51

标签: java spring upgrade

将现有项目从Java 6升级到Java 8时;我遇到了Spring Webflow 1.0的问题。

异常过渡无效。 我在Java 7上进行了测试,即使用Java 7编译并在Java 7 JVM中的Tomcat 7上运行它,它运行良好。

之前是否有人处理此问题。如果我想使用Java 8,是我唯一可以升级到Webflow 2.0。

<action-state id="determineMyServiceStatus">
    <bean-action bean="purchaseManagerDecorator" method="MyServiceType">
        <method-arguments>
            <argument expression="conversationScope.purchaseProduct" />
        </method-arguments>
    </bean-action>

    <transition on="success" to="confirmProductPurchase" />
    <transition on-exception="com.mycompany.myproj.exceptions.ACMENotAvailableException" to="resetMyServiceInformation" />
    <transition on-exception="com.mycompany.myproj.exceptions.MyServiceNotOfferedException" to="resetMyServiceInformation" />                   
    <transition on-exception="com.mycompany.myproj.exceptions.CardReferredOrDeclinedException" to="enterPaymentDetails" />      
    <transition on-exception="com.ACMEMyService.eProduct.business.validation.exception.AbstractValidationException" to="displaySystemError" />
    <transition on-exception="java.lang.Throwable" to="displayDefaultFlowErrorPage" />   

</action-state>

从Working JVM登录,即Java 6

111 AdviceInterceptor Trying to find handler for exception of type [com.mycompany.myproj.exceptions.MyServiceNotOfferedException]
 119 AdviceInterceptor Found handler for exception of type [com.ACMEMyService.eProduct.business.validation.exception.AbstractValidationException]: public void com.ACMEMyService.eProduct.advices.ACMEServiceEngineThrowsAdvice.afterThrowing(java.lang.reflect.Method,java.lang.Object[],java.lang.Object,com.ACMEMyService.eProduct.business.validation.exception.AbstractValidationException)
 188 tiveVisitorHelper Looking for method visit(class org.springframework.binding.method.Parameters)
 188 tiveVisitorHelper Looking for method visit(class org.springframework.binding.expression.support.OgnlExpression)
 188 tiveVisitorHelper Looking for method visit(interface org.springframework.binding.expression.SettableExpression)
 188 tiveVisitorHelper Looking for method visit(interface org.springframework.binding.expression.Expression)
 293 FlowExecutionImpl Attempting to handle [org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@2459533c targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@64679ac8, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@51a6e687 methodName = 'MyServiceType', parameters = [[Parameter@5df1208a type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@474834a6]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException]
 109 eExceptionHandler Handling state exception org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@2459533c targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@64679ac8, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@51a6e687 methodName = 'MyServiceType', parameters = [[Parameter@5df1208a type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@474834a6]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@2459533c targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@64679ac8, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@51a6e687 methodName = 'MyServiceType', parameters = [[Parameter@5df1208a type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@474834a6]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
Caused by: 
org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@51a6e687 methodName = 'MyServiceType', parameters = [[Parameter@5df1208a type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@474834a6]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
Caused by: 
com.mycompany.myproj.exceptions.MyServiceNotOfferedException

登录时不工作即Java 8

111 AdviceInterceptor Trying to find handler for exception of type [com.mycompany.myproj.exceptions.MyServiceNotOfferedException]
 119 AdviceInterceptor Found handler for exception of type [com.ACMEMyService.eProduct.business.validation.exception.AbstractValidationException]: public void com.ACMEMyService.eProduct.advices.ACMEServiceEngineThrowsAdvice.afterThrowing(java.lang.reflect.Method,java.lang.Object[],java.lang.Object,com.ACMEMyService.eProduct.business.validation.exception.AbstractValidationException)
 188 tiveVisitorHelper Looking for method visit(class org.springframework.binding.method.Parameters)
 188 tiveVisitorHelper Looking for method visit(class org.springframework.binding.expression.support.OgnlExpression)
 188 tiveVisitorHelper Looking for method visit(interface org.springframework.binding.expression.SettableExpression)
 188 tiveVisitorHelper Looking for method visit(interface org.springframework.binding.expression.Expression)
 293 FlowExecutionImpl Attempting to handle [org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@5282d182 targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@49560f22, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@247af0cc methodName = 'MyServiceType', parameters = [[Parameter@660d733d type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@53c80f9b]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException]
 319 FlowExecutionImpl Rethrowing unhandled flow execution exception
 101 nversationManager Unlocking conversation A6F60998-1BE6-CC3D-84EE-1CA5A3E0027C
 251 ExceptionResolver Resolving exception from handler [org.springframework.webflow.executor.mvc.FlowController@3f1ea11c]: org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@5282d182 targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@49560f22, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@247af0cc methodName = 'MyServiceType', parameters = [[Parameter@660d733d type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@53c80f9b]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
 318 ExceptionResolver Resolving to default view 'errors/defaultErrorPage' for exception of type [org.springframework.webflow.engine.ActionExecutionException]
 438 ExceptionResolver Exposing Exception as model attribute 'exception'
1092 DispatcherServlet Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'errors/defaultErrorPage'; model is {exception=org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@5282d182 targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@49560f22, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@247af0cc methodName = 'MyServiceType', parameters = [[Parameter@660d733d type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@53c80f9b]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException}
org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@5282d182 targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@49560f22, attributes = map[[empty]]] in state 'determineMyServiceStatus' of flow 'purchase-eProduct-flow' -- action execution attributes were 'map[[empty]]'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@247af0cc methodName = 'MyServiceType', parameters = [[Parameter@660d733d type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@53c80f9b]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
Caused by: 
org.springframework.binding.method.MethodInvocationException: Unable to invoke method [MethodSignature@247af0cc methodName = 'MyServiceType', parameters = [[Parameter@660d733d type = [null], name = conversationScope.purchaseProduct]]] with arguments array<Object>[com.ACMEMyService.eProduct.dataobject.PurchaseProduct@53c80f9b]; nested exception is com.mycompany.myproj.exceptions.MyServiceNotOfferedException
Caused by: 
com.mycompany.myproj.exceptions.MyServiceNotOfferedException

0 个答案:

没有答案