1 Reply Latest reply on Apr 23, 2009 3:16 PM by Alexander Müller

    Target Unreachable Problem using Business Process

    Alexander Müller Newbie


      Hi everyone,


      I've got a strange problem developing a business process with seam and jbpm. The process ittself works fine but I'm getting a strange exception when trying to access a objects that has BUSINESS PROCESS Scope.


      Here is me stateful bean:

      @Stateful
      @Name("selling")
      public class SellingAction implements Selling, Serializable  {

           private static final long serialVersionUID = -9068069239659899723L;
           
           @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
           Customer currentCustomer;


      The Customer Type looks as follows:



      @Entity
      public class Customer implements Serializable {
           /**
            *
            */
           private static final long serialVersionUID = -6572416442740922887L;
           
           private Integer id;
           private String salution;
           private String surName;
           private String lastName;
           private Address address;
           private Shop shop;
           private List<Article> articles;
           
           @Id
           @GeneratedValue(strategy=GenerationType.AUTO)
           public Integer getId() {
                return id;
           }
           public void setId(Integer id) {
                this.id = id;
           }

              ... getter and setter


      So the .xhtml file that accesses the customer object does some validation. When I'm leaving a inputText Field that uses currentCustomer I'm getting the seams debug page:


      Relevant Part of view

      <h:form id="newCustomer">
      <s:validateAll>
      <h:panelGrid columns="2">
        <h:outputText value="Anrede" />
         <s:decorate id="salution">
          <h:inputText value="#{currentCustomer.salution}">
           <a4j:support event="onblur" />
          </h:inputText>
         </s:decorate>

      The Exception is



      Exception during request processing:
      Caused by javax.servlet.ServletException with message: "/customer/newCustomer.xhtml @32,56 value="#{currentCustomer.salution}": Target Unreachable, identifier 'currentCustomer' resolved to null"
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)


      Any one got a solution, I'm struggling around for three days :(


      Thanks in advance

        • 1. Re: Target Unreachable Problem using Business Process
          Alexander Müller Newbie

          Sorry for the evil formatting, must be


          Action


          @Stateful
          @Name("selling")
          public class SellingAction implements Selling, Serializable  {
               
               /**
                * 
                */
               private static final long serialVersionUID = -9068069239659899723L;
               
               @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
               Customer currentCustomer;
               @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
               List<Article> selectedArticles;
          



          Entity


          @Entity
          public class Customer implements Serializable {
               /**
                * 
                */
               private static final long serialVersionUID = -6572416442740922887L;
               
               private Integer id;
               private String salution;
               private String surName;
               private String lastName;
               private Address address;
               private Shop shop;
               private List<Article> articles;
               
               @Id
               @GeneratedValue(strategy=GenerationType.AUTO)
               public Integer getId() {
                    return id;
               }
               public void setId(Integer id) {
                    this.id = id;
               }
          



          Page


          <h:form id="newCustomer">
           <s:validateAll>
            <h:panelGrid columns="2">
             <h:outputText value="Anrede" />
              <s:decorate id="salution">
               <h:inputText value="#{currentCustomer.salution}">
                <a4j:support event="onblur" />
               </h:inputText>
              </s:decorate>
          



          And the resulting exception is (if I'm leaving the inputText field and the validation should start)


          Exception during request processing:
          Caused by javax.servlet.ServletException with message: "/customer/newCustomer.xhtml @32,56 value="#{currentCustomer.salution}": Target Unreachable, identifier 'currentCustomer' resolved to null"
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          java.lang.Thread.run(Thread.java:619)
          Caused by javax.el.PropertyNotFoundException with message: "/customer/newCustomer.xhtml @32,56 value="#{currentCustomer.salution}": Target Unreachable, identifier 'currentCustomer' resolved to null"
          com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
          com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
          javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
          javax.faces.component.UIInput.validate(UIInput.java:868)
          javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
          javax.faces.component.UIInput.processValidators(UIInput.java:672)
          javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
          javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
          javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
          javax.faces.component.UIForm.processValidators(UIForm.java:235)
          org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
          org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
          org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
          com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
          com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
          com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
          org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
          org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
          org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
          org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          java.lang.Thread.run(Thread.java:619)