Random null pointer exception in webflow when starting a flow

438 Views Asked by At

We get this NPE. Don't know when, why or how. I have not been able to reproduce it yet. But we see it a lot in production. What can cause this?? It seems like the flow execution key is null when starting a flow. Seems to happen totally random.

Here is the stack trace. Anyone having any ideas or has seen this before? Thank you

Caused by: java.lang.NullPointerException at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getConversation(AbstractFlowExecutionRepository.java:170)
        at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.getLock(AbstractFlowExecutionRepository.java:125)
        at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:142)
        at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:237)
        at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:46)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
1

There are 1 best solutions below

0
On BEST ANSWER

This was actually due to an exception occurring in the on-start block of our code. But this exception was generated as a follow up exception because Web Flow still tried to execute code even though it had failed before. So kind of confusing.