Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: can you please help to resolve the following exception in webflow?

  1. #1

    Default can you please help to resolve the following exception in webflow?

    Hi,

    I'm getting the following exception in webflow:

    No transition found on occurence of event 'processChanges' in state 'errorDisplay' of flow 'manageorder-flow' -- valid transitional criteria are array<TransitionCriteria>[[empty]] -- likely programmer error, check the set of TransitionCriteria for this state

    can you pl. help me to resolve this error?

    Thanks,

    myjo@hotmail.com

  2. #2

    Default

    Error message says 'state' it is looking for is not defined in flow. You have to give more code to us.

  3. #3

    Default

    Hi Misha79,

    Thank you for replying. Here is more code:

    The manageorder-flow.XML is actually a sub-flow which is having 3 parent flows. reneworderflow.xml, createneworder-flow.xml and editorder-flow.xml. In the managerorder-flow.xml the following code executes fine

    <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />

    But after executing this above-mentioned code, the execution is suppose to go to following code

    <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />

    But it never goes here, before going here it gives an exception.

    The manageorder-flow.xml have following code :


    Manageorder-flow.xml:


    <view-state id="reviewOrder" view="reviewOrder" model="onlineAdoption"
    parent="baseddcs-flow#baseDDCS">

    <on-entry>
    <evaluate expression="true" result="flowScope.reviewOrderHasBeenDisplayed" />
    </on-entry>

    <transition on="selectAddMoreMaterial" to="addMaterialDecision" />

    <transition on="processChanges">
    <evaluate
    expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)"
    result="requestScope.uow" />
    <evaluate
    expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
    <render fragments="reviewOrderSubmissionResponse" />
    </transition>

    <transition
    on-exception="com.follett.fheg.ecommerce.onlineadopti ons.model.adoption.changeaction.actions.AdoptionCh angeActionException" to="submitOrder">
    <evaluate
    expression="T(com.follett.fheg.ecommerce.onlineado ptions.util.ExceptionUtils).buildServerResponseMes sage(flashScope.rootCauseException)"
    result="flashScope.serverResponseMessage" />
    <render fragments="reviewOrderSubmissionResponse" />
    </transition>

    <transition on="continue" to="submitOrder" history="invalidate" />

    </view-state>

    <view-state id="submitOrder" model="onlineAdoptions" view ="submitOrder">

    <transition on="processOrderSubmit">
    <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />
    <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
    <render fragments="procesOrderSubmitResult" />
    </transition>

    <transition
    on-exception="com.follett.fheg.ecommerce.onlineadopti ons.service.AdoptionServiceException" to="submitOrder">
    <evaluate
    expression="T(com.follett.fheg.ecommerce.onlineado ptions.util.ExceptionUtils).buildServerResponseMes sage(flashScope.rootCauseException)"
    result="flashScope.serverResponseMessage" />
    <render fragments="procesOrderSubmitResult" />
    </transition>

    <transition on="processOrderComplete" to="manageOrderComplete" />

    <transition on="back" to="reviewOrder" bind="false">
    <evaluate expression="ddcsLoaderAction.loadDDCSForOnlineAdop tion(flowRequestContext, conversationScope.onlineAdoption, courseSearchScope)" />
    </transition>

    </view-state>


    On the server console, we are getting the following:


    Server console:

    Sep 10, 2012 10:57:31 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at com.follett.fheg.ecommerce.onlineadoptions.web.con text.impl.StoreProfileContextImpl.getCTStoreNumber (StoreProfileContextImpl.java:330)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.el.BeanELResolver.getValue(BeanELResolver.ja va:62)
    at javax.el.CompositeELResolver.getValue(CompositeELR esolver.java:53)
    at org.apache.el.parser.AstValue.getValue(AstValue.ja va:97)
    at org.apache.el.parser.AstNotEqual.getValue(AstNotEq ual.java:21)
    at org.apache.el.ValueExpressionImpl.getValue(ValueEx pressionImpl.java:186)
    at org.apache.jasper.runtime.PageContextImpl.propriet aryEvaluate(PageContextImpl.java:923)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspx_meth_c_005fwhen_005f0(footer_jsp.java:5 64)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspx_meth_c_005fchoose_005f0(footer_jsp.java :533)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspService(footer_jsp.java:244)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:654)
    at org.apache.catalina.core.ApplicationDispatcher.doI nclude(ApplicationDispatcher.java:557)
    at org.apache.catalina.core.ApplicationDispatcher.inc lude(ApplicationDispatcher.java:481)
    at org.apache.jasper.runtime.JspRuntimeLibrary.includ e(JspRuntimeLibrary.java:968)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspx_meth_c_005fotherwise_005f0(branded_js p.java:648)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspx_meth_c_005fchoose_005f0(branded_jsp.j ava:373)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspService(branded_jsp.java:202)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

  4. #4

    Default

    Please use code-tags to format the code snippet so that it becomes readable for us.
    From your post, i assume it is not the same-error message now that you gave in first post.

    Seems you were able to move past that and now it is NullPointerException and as you say ,it doesnt reach that method-applyChangeActionUOW() and before it fails.
    That means, you have to debug createChangeActions() method which somehow calls directly/indirectly StoreProfileContextImpl.getCTStoreNumber() to throw nullpointerexception.

    I cant be of much help as i dont know how methods are called.

    Code:
    <transition on="processChanges">
                         <evaluate
                                expression="changeActionFactory.createChangeActions(requestParameters.execution, requestParameters.uowXml)"
                               result="requestScope.uow" />
                         <evaluate
                               expression="unitOfWorkManager.applyChangeActionUOW(flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
                         <render fragments="reviewOrderSubmissionResponse" />
                  </transition>
    Quote Originally Posted by myjo@hotmail.com View Post
    Hi Misha79,

    Thank you for replying. Here is more code:

    The manageorder-flow.XML is actually a sub-flow which is having 3 parent flows. reneworderflow.xml, createneworder-flow.xml and editorder-flow.xml. In the managerorder-flow.xml the following code executes fine

    <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />

    But after executing this above-mentioned code, the execution is suppose to go to following code

    <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />

    But it never goes here, before going here it gives an exception.

    The manageorder-flow.xml have following code :


    Manageorder-flow.xml:


    <view-state id="reviewOrder" view="reviewOrder" model="onlineAdoption"
    parent="baseddcs-flow#baseDDCS">

    <on-entry>
    <evaluate expression="true" result="flowScope.reviewOrderHasBeenDisplayed" />
    </on-entry>

    <transition on="selectAddMoreMaterial" to="addMaterialDecision" />

    <transition on="processChanges">
    <evaluate
    expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)"
    result="requestScope.uow" />
    <evaluate
    expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
    <render fragments="reviewOrderSubmissionResponse" />
    </transition>

    <transition
    on-exception="com.follett.fheg.ecommerce.onlineadopti ons.model.adoption.changeaction.actions.AdoptionCh angeActionException" to="submitOrder">
    <evaluate
    expression="T(com.follett.fheg.ecommerce.onlineado ptions.util.ExceptionUtils).buildServerResponseMes sage(flashScope.rootCauseException)"
    result="flashScope.serverResponseMessage" />
    <render fragments="reviewOrderSubmissionResponse" />
    </transition>

    <transition on="continue" to="submitOrder" history="invalidate" />

    </view-state>

    <view-state id="submitOrder" model="onlineAdoptions" view ="submitOrder">

    <transition on="processOrderSubmit">
    <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />
    <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
    <render fragments="procesOrderSubmitResult" />
    </transition>

    <transition
    on-exception="com.follett.fheg.ecommerce.onlineadopti ons.service.AdoptionServiceException" to="submitOrder">
    <evaluate
    expression="T(com.follett.fheg.ecommerce.onlineado ptions.util.ExceptionUtils).buildServerResponseMes sage(flashScope.rootCauseException)"
    result="flashScope.serverResponseMessage" />
    <render fragments="procesOrderSubmitResult" />
    </transition>

    <transition on="processOrderComplete" to="manageOrderComplete" />

    <transition on="back" to="reviewOrder" bind="false">
    <evaluate expression="ddcsLoaderAction.loadDDCSForOnlineAdop tion(flowRequestContext, conversationScope.onlineAdoption, courseSearchScope)" />
    </transition>

    </view-state>


    On the server console, we are getting the following:


    Server console:

    Sep 10, 2012 10:57:31 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at com.follett.fheg.ecommerce.onlineadoptions.web.con text.impl.StoreProfileContextImpl.getCTStoreNumber (StoreProfileContextImpl.java:330)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.el.BeanELResolver.getValue(BeanELResolver.ja va:62)
    at javax.el.CompositeELResolver.getValue(CompositeELR esolver.java:53)
    at org.apache.el.parser.AstValue.getValue(AstValue.ja va:97)
    at org.apache.el.parser.AstNotEqual.getValue(AstNotEq ual.java:21)
    at org.apache.el.ValueExpressionImpl.getValue(ValueEx pressionImpl.java:186)
    at org.apache.jasper.runtime.PageContextImpl.propriet aryEvaluate(PageContextImpl.java:923)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspx_meth_c_005fwhen_005f0(footer_jsp.java:5 64)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspx_meth_c_005fchoose_005f0(footer_jsp.java :533)
    at org.apache.jsp.WEB_002dINF.jsp.pages.common.footer _jsp._jspService(footer_jsp.java:244)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:654)
    at org.apache.catalina.core.ApplicationDispatcher.doI nclude(ApplicationDispatcher.java:557)
    at org.apache.catalina.core.ApplicationDispatcher.inc lude(ApplicationDispatcher.java:481)
    at org.apache.jasper.runtime.JspRuntimeLibrary.includ e(JspRuntimeLibrary.java:968)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspx_meth_c_005fotherwise_005f0(branded_js p.java:648)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspx_meth_c_005fchoose_005f0(branded_jsp.j ava:373)
    at org.apache.jsp.WEB_002dINF.jsp.pages.layouts.brand ed_jsp._jspService(branded_jsp.java:202)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:393)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

  5. #5

    Default Reply

    Quote Originally Posted by Misha79 View Post
    Please use code-tags to format the code snippet so that it becomes readable for us.
    From your post, i assume it is not the same-error message now that you gave in first post.

    Seems you were able to move past that and now it is NullPointerException and as you say ,it doesnt reach that method-applyChangeActionUOW() and before it fails.
    That means, you have to debug createChangeActions() method which somehow calls directly/indirectly StoreProfileContextImpl.getCTStoreNumber() to throw nullpointerexception.

    I cant be of much help as i dont know how methods are called.

    Code:
    <transition on="processChanges">
                         <evaluate
                                expression="changeActionFactory.createChangeActions(requestParameters.execution, requestParameters.uowXml)"
                               result="requestScope.uow" />
                         <evaluate
                               expression="unitOfWorkManager.applyChangeActionUOW(flowRequestContext, conversationScope.onlineAdoptionsPathScope)" />
                         <render fragments="reviewOrderSubmissionResponse" />
                  </transition>


    Hi Misha,
    Thank you for replying.

    I'm still getting the same error message that I posted in my 1st post as follows:

    No transition found on occurence of event 'processChanges' in state 'errorDisplay' of flow 'manageorder-flow' -- valid transitional criteria are array<TransitionCriteria>[[empty]] -- likely programmer error, check the set of TransitionCriteria for this state.

    On the server log, I'm getting the null-pointer exception message but when I debuged the createChangeActions() method, in the exception(variable) I'm getting the same message as I posted in my 1st post

    No transition found on occurence of event 'processChanges' in state 'errorDisplay' of flow 'manageorder-flow' -- valid transitional criteria are array<TransitionCriteria>[[empty]] -- likely programmer error, check the set of TransitionCriteria for this state.

    Misha79 : This is what server log message on my debug server console I'm getting:

    2012-09-17 11:32:25,970 Thread:[http-8080-3] [ERROR] com.follett.fheg.ecommerce.onlineadoptions.web.web flow.OnlineAdoptionFlowExecutionExceptionHandler - null
    java.lang.NullPointerException
    at org.springframework.expression.spel.ast.PropertyOr FieldReference.getValueInternal(PropertyOrFieldRef erence.java:74)
    at org.springframework.expression.spel.ast.CompoundEx pression.getValueInternal(CompoundExpression.java: 52)
    at org.springframework.expression.spel.ast.SpelNodeIm pl.getTypedValue(SpelNodeImpl.java:102)
    at org.springframework.expression.spel.standard.SpelE xpression.getValue(SpelExpression.java:97)
    at org.springframework.binding.expression.spel.Spring ELExpression.getValue(SpringELExpression.java:78)
    at org.springframework.webflow.action.EvaluateAction. doExecute(EvaluateAction.java:75)
    at org.springframework.webflow.action.AbstractAction. execute(AbstractAction.java:188)
    at org.springframework.webflow.execution.AnnotatedAct ion.execute(AnnotatedAction.java:145)
    at org.springframework.webflow.execution.ActionExecut or.execute(ActionExecutor.java:51)
    at org.springframework.webflow.engine.support.ActionT ransitionCriteria.test(ActionTransitionCriteria.ja va:82)
    at org.springframework.webflow.engine.support.Transit ionCriteriaChain.test(TransitionCriteriaChain.java :71)
    at org.springframework.webflow.engine.Transition.canE xecute(Transition.java:195)
    at org.springframework.webflow.engine.Transition.exec ute(Transition.java:211)
    at org.springframework.webflow.engine.impl.FlowExecut ionImpl.execute(FlowExecutionImpl.java:391)
    at org.springframework.webflow.engine.impl.RequestCon trolContextImpl.execute(RequestControlContextImpl. java:214)
    at org.springframework.webflow.engine.TransitionableS tate.handleEvent(TransitionableState.java:119)
    at org.springframework.webflow.engine.Flow.handleEven t(Flow.java:555)
    at org.springframework.webflow.engine.impl.FlowExecut ionImpl.handleEvent(FlowExecutionImpl.java:386)
    at org.springframework.webflow.engine.impl.RequestCon trolContextImpl.handleEvent(RequestControlContextI mpl.java:210)
    at org.springframework.webflow.engine.ViewState.handl eEvent(ViewState.java:230)
    at org.springframework.webflow.engine.ViewState.resum e(ViewState.java:196)
    at org.springframework.webflow.engine.Flow.resume(Flo w.java:545)
    at org.springframework.webflow.engine.impl.FlowExecut ionImpl.resume(FlowExecutionImpl.java:259)
    at org.springframework.webflow.executor.FlowExecutorI mpl.resumeExecution(FlowExecutorImpl.java:169)
    at org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(FlowHandlerAdapter.java:183)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:788)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:717)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:560)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 343)
    at com.follett.fheg.ecommerce.onlineadoptions.web.sec urity.filter.AccountAccessValidationSecurityFilter .doFilter(AccountAccessValidationSecurityFilter.ja va:86)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:109)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:97)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:100)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:35)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.authentication.http://www.BasicAuthenticationFilter...lter.java:177)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:187)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:149)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.RequestContextFilte r.doFilterInternal(RequestContextFilter.java:83)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    Last edited by myjo@hotmail.com; Sep 17th, 2012 at 11:36 AM.

  6. #6

    Default

    Hi

    Seems your method(bold) is return string or name of event which happens to be "errorDisplay".
    You have to see where is the code that is generating that string 'errorDisplay' ; or you could post snippet, i can help little bit but since i cannt debug your method.

    Code:
    <transition on="processOrderSubmit">
     <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />
     <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" /> 
    <render fragments="procesOrderSubmitResult" />
     </transition>

  7. #7

    Default

    Quote Originally Posted by Misha79 View Post
    Hi

    Seems your method(bold) is return string or name of event which happens to be "errorDisplay".
    You have to see where is the code that is generating that string 'errorDisplay' ; or you could post snippet, i can help little bit but since i cannt debug your method.

    Code:
    <transition on="processOrderSubmit">
     <evaluate expression="changeActionFactory.createChangeAction s(requestParameters.execution, requestParameters.uowXml)" result="requestScope.uow" />
     <evaluate expression="unitOfWorkManager.applyChangeActionUOW (flowRequestContext, conversationScope.onlineAdoptionsPathScope)" /> 
    <render fragments="procesOrderSubmitResult" />
     </transition>

    Hi Misha79,

    Here is the code :

    public class OnlineAdoptionChangeActionFactory implements BeanFactoryAware {

    @SuppressWarnings("unused")
    private static final String cvsid = "$Id: OnlineAdoptionChangeActionFactory.java,v 1.5 2011/03/31 19:29:07 smukher Exp $";
    private static final String PACKAGE_PATH = OnlineAdoptionChangeActionFactory.class.getPackage ().getName();

    private BeanFactory beanFactory = null ;
    private Unmarshaller unmarshaller = null ;

    /**
    * Takes in the ChangeAction string generated from the browser and gives
    * back a list of concrete <code>OnlineAdoptionChangeAction</code>.
    *
    * @param xmlString
    * @return
    * @throws AdoptionChangeActionException
    */
    public OnlineAdoptionChangeActionUnitOfWork createChangeActions ( final String executionId, final String xmlString ) throws AdoptionChangeActionException {

    if (StringUtils.isBlank(xmlString)) {
    throw new AdoptionChangeActionException(LogicalErrorCode.CHA NGE_ACTION_FACTORY_TRANSFORMATION_ERROR);
    }

    ChangeActions changeActionsDataList = null ;

    try {

    final Source source = new StreamSource(org.apache.commons.io.IOUtils.toInput Stream(xmlString));
    changeActionsDataList = (ChangeActions) this.unmarshaller.unmarshal(source) ;

    } catch (final IOException e) {
    throw new AdoptionChangeActionException(LogicalErrorCode.CHA NGE_ACTION_FACTORY_TRANSFORMATION_ERROR, e) ;
    }

    return this.createChangeActions(executionId, changeActionsDataList) ;
    }

    Here is the code snippet for "errorDisplay".

    public ModelAndView home(final HttpServletRequest request,final HttpServletResponse response) {

    final ModelAndView mav = new ModelAndView("home");

    final UsernamePasswordAuthenticationToken upat = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthenticati on();
    final UserCredential userCredential = (UserCredential) upat.getPrincipal();
    final Long userId= userCredential.getUserId();
    String storeNumber="";

    try {

    final UserProfile userProfile = this.userProfileService.getUserProfileByUserProfil eId(userId);

    if (!this.userProfileContext.isInitialized()) {
    if (userProfile == null) {
    LOG.error("userProfile is null");
    mav.setViewName("errorDisplay");
    } else {
    this.userProfileContext.setUserProfile(userProfile );
    this.userProfileContext.markInitialized();
    }
    }

    if (!"errorDisplay".equals(mav.getViewName()) && !this.storeProfileContext.isInitialized()) {

    final StoreProfile storeProfile = this.storeProfileService.getStoreProfileByOAStoreP rofileId(Long.valueOf(userProfile.getOaStoreProfil eId()));
    if (storeProfile == null) {
    LOG.error("storeProfile is null");
    mav.setViewName("errorDisplay");
    } else {
    this.storeProfileContext.setStoreProfile(storeProf ile);
    this.storeProfileContext.setLocale(userProfile.get DefaultLocaleId());

    // We must set the message store after all other initialization, but before
    // we mark it as initialized.
    this.storeProfileContext.setMessageSource(this.mes sageSource);
    this.storeProfileContext.markInitialized();
    storeNumber=storeProfile.getExternalStoreNumber();
    }
    }

    if (!"errorDisplay".equals(mav.getViewName()) && userProfile != null) {
    // get the locale resolver
    final LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);

    if (localeResolver != null) {
    // get the new locale name from the request param, if possible
    final String newLocaleName = userProfile.getDefaultLocaleId();

    if (newLocaleName != null) {
    final LocaleEditor localeEditor = new LocaleEditor();
    localeEditor.setAsText(newLocaleName);

    // set the new locale
    localeResolver.setLocale(request, response,
    (Locale) localeEditor.getValue());
    }
    }


    final Long userProfileId = userProfile.getUserId();
    final HttpSession session = request.getSession(true);

    if(session.getAttribute("provileAlreadyValidatedFo rCompleteness") == null
    && !this.userProfileService.validateUserprofilesCompl eteByUserProfileId(userProfileId)){

    final UserProfileForm userProfileForm = this.userProfileService.getProfileByUserId(userPro fileId);
    userProfileForm.setPassword("dummy123");
    //userProfileForm.setSecurityQuestionAnswer("dummy12 3");
    mav.addObject("StoreNumber",storeNumber);
    getDataList(mav);
    mav.setViewName(WebConstants.View.UPDATE_PROFILE_V IEW);
    mav.addObject(WebConstants.ModelMapKey.USER_PROFIL E_FORM, userProfileForm);
    mav.addObject(ModelMapKey.SERVER_RESPONSE_MESSAGE, new ServerResponseMessage(LogicalErrorCode.USER_PROFIL E_INCOMPLETE));
    } else {
    session.setAttribute("provileAlreadyValidatedForCo mpleteness", "provileAlreadyValidatedForCompleteness");
    }
    }

    if (!"errorDisplay".equals(mav.getViewName())) {
    final List<OnlineAdoption> onlineAdoptionList = this.onlineAdoptionService.getOnlineAdoptionsBySta tusAndSubmitter(OnlineAdoptionStatus.DRAFT, this.userProfileContext.getUserProfileId());

    if (CollectionUtils.isNotEmpty(onlineAdoptionList)) {

    // If there are any online adoptions in draft status, we need to store the id
    // so the page can create an edit link. Only a single draft is supported, so
    // instead of going to error view we will simply pull the first online adoption
    // and let the user edit that one. Any creation of a new online adoption should
    // be deleting any existing online adoptions in draft status so we should not reach
    // this condition.
    final OnlineAdoption onlineAdoption = onlineAdoptionList.get(0);
    mav.addObject("draftOnlineAdoptionId", onlineAdoption.getOnlineAdoptionId());
    }
    }

    } catch (final AdoptionServiceException e) {
    LOG.error(e.getMessage(), e);
    mav.setViewName("errorDisplay");
    } catch (final AdoptionContextInitializationException e) {
    LOG.error(e.getMessage(), e);
    mav.setViewName("errorDisplay");
    }

    return mav;
    }
    Last edited by myjo@hotmail.com; Sep 17th, 2012 at 02:59 PM.

  8. #8

    Default

    Is there anyone on this community who can help me resolve this issue. Any help will be highly appreciated.
    Thanks,

  9. #9

    Default

    Hi

    You code is really difficult to understand. Above that its not formatted. Plase use code-tags to post any code. This will help us to help you.

    If you could post StoreProfileContextImpl class , it might help ,since there is call to this method StoreProfileContextImpl.getCTStoreNumber() .


    Also please put breakpoints on this location --
    Code:
    if (!"errorDisplay".equals(mav.getViewName()) && !this.storeProfileContext.isInitialized()) {
    
    final StoreProfile storeProfile = this.storeProfileService.getStoreProfileByOAStoreP rofileId(Long.valueOf(userProfile.getOaStoreProfil eId()));
    if (storeProfile == null) {
    LOG.error("storeProfile is null");
    mav.setViewName("errorDisplay");
    } else {
    this.storeProfileContext.setStoreProfile(storeProf ile);
    this.storeProfileContext.setLocale(userProfile.get DefaultLocaleId());
    
    // We must set the message store after all other initialization, but before
    // we mark it as initialized.
    this.storeProfileContext.setMessageSource(this.mes sageSource);
    this.storeProfileContext.markInitialized();
    storeNumber=storeProfile.getExternalStoreNumber();
    }
    }
    and StoreProfileContextImpl.getCTStoreNumber() inside this method and see at what line it throws Exception.

  10. #10

    Default

    Hi MIsha79,

    Thank you for this e-mail. I'm sorry that our code is really difficult to understand. I have put in the 'Code Tags' around my code, and I have also formatted my code in more readable manner and have posted it out. The StoreProfileContextImpl class is having following code (I have put code tags around this code:
    ================================================== ===============================================
    package com.follett.fheg.ecommerce.onlineadoptions.web.con text.impl;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Locale;
    import java.util.Map;
    import org.apache.commons.lang.StringUtils;
    import org.springframework.context.MessageSource;
    import com.follett.fheg.ecommerce.onlineadoptions.model.d omain.MaterialReqType;
    import com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile;
    import com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfileDescription;
    import com.follett.fheg.ecommerce.onlineadoptions.web.con text.StoreProfileContext;

    /**
    * Implementation class for StoreProfileContext to manage store profile information.
    *
    * @author akesingh
    *
    */
    public class StoreProfileContextImpl implements StoreProfileContext {

    @SuppressWarnings("unused")
    private static final String cvsid = "$Id: StoreProfileContextImpl.java,v 1.11 2011/02/25 04:54:56 mnolan Exp $";

    private static final String MESSAGE_SOURCE = "messageSource";

    private static final long serialVersionUID = 3220177064920697756L;
    private StoreProfile storeProfile;
    private StoreProfileDescription storeProfileDescriptionForCurrentLocaleName;
    private String localeName;
    private boolean initialized = false;

    private String contactSiteDomain;
    private String imageServerDomain;

    private final Map<String, Map<String, String>> defaultMessageMap = new HashMap<String, Map<String,String>>();

    /**
    * Clears the state for the current session.
    */
    @Override
    public void clear() {

    this.localeName = null;
    this.storeProfile = null;
    // IMPORTANT: Do not clear the defaultMessageMap. This is needed later on.
    }

    @Override
    public void setStoreProfile(final StoreProfile storeProfile) {
    this.storeProfile = storeProfile;
    if (StringUtils.isNotBlank(this.localeName)) {
    getStoreProfileDescriptionForCurrentLocale();
    }
    }

    private void getStoreProfileDescriptionForCurrentLocale() {
    int localeNameId = -1;
    if ("en_US".equals(this.localeName)) {
    localeNameId = 1;
    } else if ("fr_FR".equals(this.localeName)) {
    localeNameId = 2;
    }
    for (final StoreProfileDescription spDesc : this.storeProfile.getStoreProfileDescription()) {

    if (spDesc.getLocale() == localeNameId) {
    this.storeProfileDescriptionForCurrentLocaleName = spDesc;
    break;
    }
    }
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getExternalStoreNumber()
    */
    public String getExternalStoreNumber() {
    return (this.storeProfile != null) ? this.storeProfile.getExternalStoreNumber() : "";
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getLegalDisclosureAgreementFlag ()
    */
    public String getLegalDisclosureAgreementFlag() {
    return this.storeProfile.getLegalDisclosureAgreementFlag( );
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getMaterialRequirementTypeLabel s()
    */
    public Map<String, String> getMaterialRequirementTypeLabels() {
    return this.storeProfile.getMaterialRequirementTypeLabels ();
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getOaStoreId()
    */
    public long getOaStoreId() {
    return this.storeProfile.getOaStoreId();
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getStoreLogo()
    */
    public String getStoreLogo() {
    return this.imageServerDomain + "htmlroot/images/templates/storeLogos/CA/" + getExternalStoreNumber() + ".gif";
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#getStoreName()
    */
    public String getStoreName() {
    return (this.storeProfile != null) ? this.storeProfile.getStoreName() : "";
    }

    /**
    * @return
    * @see com.follett.fheg.ecommerce.onlineadoptions.model.d omain.StoreProfile#isGlobalStore()
    */
    public boolean isGlobalStore() {
    return this.storeProfile.isGlobalStore();
    }

    @Override
    public String getCampusLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getProgramLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etProgramLabel();
    } else {
    //return this.messageSource.getMessage("common.label.campus ", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.campus");
    }
    }

    @Override
    public String getCourseLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getCourseLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etCourseLabel();
    } else {
    //return this.messageSource.getMessage("common.label.course ", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.course");
    }
    }

    @Override
    public String getDivisionLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getDivisionLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etDivisionLabel();
    } else {
    //return this.messageSource.getMessage("common.label.divisi on", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.division");
    }
    }

    @Override
    public String getDepartmentLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getDepartmentLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etDepartmentLabel();
    } else {
    //return this.messageSource.getMessage("common.label.depart ment", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.department");
    }
    }

    @Override
    public Map<String, String> getMaterialRequirementTypeLabel() {
    // TODO Auto-generated method stub
    return null;
    }

    @Override
    public String getSectionLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getSectionLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etSectionLabel();
    } else {
    //return this.messageSource.getMessage("common.label.sectio n", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.section");
    }
    }

    @Override
    public String getTermLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getTermLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etTermLabel();
    } else {
    //return this.messageSource.getMessage("common.label.term", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.term");

    }
    }

    @Override
    public String getInstructorLabel() {
    if (StringUtils.isNotBlank(this.storeProfileDescripti onForCurrentLocaleName.getInstructorLabel())) {
    return this.storeProfileDescriptionForCurrentLocaleName.g etInstructorLabel();
    } else {
    //return this.messageSource.getMessage("common.label.instru ctor", new Object[0], new Locale(this.localeName) );
    return getDefaultMessageForKey(this.localeName, "common.label.instructor");
    }
    }

    @Override
    public void setLocale(final String localeName) {

    this.localeName = localeName;
    getStoreProfileDescriptionForCurrentLocale();
    }

    @Override
    public Long getOaStoreProfileId() {
    return this.storeProfile.getOaStoreId();
    }

    @Override
    public boolean isInitialized() {
    return this.initialized;
    }

    @Override
    public void markInitialized() {
    this.initialized = true;
    }

    @Override
    public boolean isStoreProfileGlobal() {
    return this.storeProfile.isGlobalStore();
    }


    @Override
    public String getCTStoreNumber() {
    return this.storeProfile.getCtStoreNumber();
    }

    }

    Last edited by myjo@hotmail.com; Oct 1st, 2012 at 09:04 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •