[jboss-user] [JBoss Seam] - NPE in BusinessProcessContext

talekar do-not-reply at jboss.com
Fri Jul 20 21:28:39 EDT 2007


Hi,
I have a simple process:

<process-definition name="SimpleWorkflow">
  | 	<start-state name="start">
  | 		<transition to="end"></transition>
  | 	</start-state>
  | 
  | 	<end-state name="end"></end-state>
  | </process-definition>

This is started from the following stateful bean:

@Stateful
  | @Name("SimpleWorkflowManager")
  | public class SimpleWorkflowManagerImpl implements SimpleWorkflowManager, Serializable {
  | 
  | 	private static final long serialVersionUID = 1L;
  | 
  | 	@Logger
  | 	private static Log LOG;
  | 
  | 	@PersistenceContext(type = PersistenceContextType.EXTENDED)
  | 	private EntityManager entityManager;
  | 
  | 	@CreateProcess(definition = "SimpleWorkflow")
  | 	public void begin() {
  | 		LOG.debug("begin");
  | 		LOG.debug("end");
  | 	}
  | 
  | 	@Remove
  | 	@Destroy
  | 	public void destroy() {
  | 	}
  | }

Called from the following page:

!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  |                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  | 	xmlns:s="http://jboss.com/products/seam/taglib"
  | 	xmlns:ui="http://java.sun.com/jsf/facelets"
  | 	xmlns:f="http://java.sun.com/jsf/core"
  | 	xmlns:h="http://java.sun.com/jsf/html"
  | 	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  | 	template="../layout/template.xhtml">
  | 	<ui:define name="body">
  | 		<h:messages styleClass="message" />
  | 		<s:link action="#{SimpleWorkflowManager.begin}"
  | 			value="Start Simple Workflow" />
  | 		<f:view>
  | 			<h:form id="list">
  | 				<div>
  |                                 <rich:dataTable value="#{taskInstanceList}" var="task">
  | 					<rich:column>
  | 						<f:facet name="header">
  | 							<h:outputText value="Name" />
  | 						</f:facet>
  | 						<h:outputText value="#{task.name}" />
  | 					</rich:column>
  | 					<rich:column>
  | 						<f:facet name="header">
  | 							<h:outputText value="Description" />
  | 						</f:facet>
  | 						<h:outputText value="#{task.description}" />
  | 					</rich:column>
  | 				</rich:dataTable>
  |                             </div>
  | 			</h:form>
  | 		</f:view>
  | 	</ui:define>
  | </ui:composition>
  | 

And I get the following error after clicking the link:

21:17:55,957 ERROR [SeamPhaseListener.afterPhase] uncaught exception
  | java.lang.NullPointerException
  |         at org.jboss.seam.contexts.BusinessProcessContext.getNamesFromContext(BusinessProcessContext.java:109)
  |         at org.jboss.seam.contexts.BusinessProcessContext.getNames(BusinessProcessContext.java:92)
  |         at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:220)
  |         at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:404)
  |         at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:315)
  |         at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:256)
  |         at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
  |         at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         at java.lang.Thread.run(Thread.java:619)
  | 21:17:55,958 ERROR [SeamPhaseListener.afterPhase] swallowing exception
  | java.lang.NullPointerException
  |         at org.jboss.seam.contexts.BusinessProcessContext.getNamesFromContext(BusinessProcessContext.java:109)
  |         at org.jboss.seam.contexts.BusinessProcessContext.getNames(BusinessProcessContext.java:92)
  |         at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:220)
  |         at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:404)
  |         at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:315)
  |         at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:256)
  |         at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
  |         at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         at java.lang.Thread.run(Thread.java:619)

Thanks in advance.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066367#4066367

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066367



More information about the jboss-user mailing list