2 Replies Latest reply on Oct 17, 2007 7:42 AM by fady.matar

    Error in ejb-jar.xml

      There's a mistake in the ejb-jar.xml within the enterprise package of the source code. The current ejb-jar.xml is:

      ...
      <session>
       <description>jBPM SLSB Command Service Bean</description>
       <display-name>jBPM SLSB Command Service Bean</display-name>
       <ejb-name>CommandServiceBean</ejb-name>
       <home>
       org.jbpm.ejb.RemoteCommandServiceHome
       </home>
       <remote>
       org.jbpm.ejb.RemoteCommandService
       </remote>
       <local-home>
       org.jbpm.ejb.LocalCommandServiceHome
       </local-home>
       <local>
       org.jbpm.ejb.LocalCommandService
       </local>
       <ejb-class>org.jbpm.ejb.impl.CommandServiceBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
       <ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
       <local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
       <ejb-link>TimerServiceBean</ejb-link>
       </ejb-local-ref>
       <!--
       <env-entry>
       <env-entry-name>JbpmCfgResource</env-entry-name>
       <env-entry-type>java.lang.String</env-entry-type>
       <env-entry-value>jbpm.cfg.xml</env-entry-value>
       </env-entry>
       -->
       </session>
      
       <session>
       <description>jBPM SLSB Timer Service Bean</description>
       <display-name>jBPM SLSB Timer Service Bean</display-name>
       <ejb-name>TimerServiceBean</ejb-name>
       <local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
       <local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
       <ejb-class>org.jbpm.scheduler.ejbtimer.TimerServiceBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
       <ejb-ref-name>ejb/LocalCommandServiceBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home>org.jbpm.ejb.LocalCommandServiceHome</local-home>
       <local>org.jbpm.ejb.LocalCommandService</local>
       <ejb-link>CommandServiceBean</ejb-link>
       </ejb-local-ref>
       </session>
      ...
      


      the <ejb-local-ref> chunks are mixed between the two ejbs it should be the following:

      <session>
       <description>jBPM SLSB Command Service Bean</description>
       <display-name>jBPM SLSB Command Service Bean</display-name>
       <ejb-name>CommandServiceBean</ejb-name>
       <home>
       org.jbpm.ejb.RemoteCommandServiceHome
       </home>
       <remote>
       org.jbpm.ejb.RemoteCommandService
       </remote>
       <local-home>
       org.jbpm.ejb.LocalCommandServiceHome
       </local-home>
       <local>
       org.jbpm.ejb.LocalCommandService
       </local>
       <ejb-class>org.jbpm.ejb.impl.CommandServiceBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
       <ejb-ref-name>ejb/LocalCommandServiceBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home>org.jbpm.ejb.LocalCommandServiceHome</local-home>
       <local>org.jbpm.ejb.LocalCommandService</local>
       <ejb-link>CommandServiceBean</ejb-link>
       </ejb-local-ref>
      
       <!--
       <env-entry>
       <env-entry-name>JbpmCfgResource</env-entry-name>
       <env-entry-type>java.lang.String</env-entry-type>
       <env-entry-value>jbpm.cfg.xml</env-entry-value>
       </env-entry>
       -->
       </session>
      
       <session>
       <description>jBPM SLSB Timer Service Bean</description>
       <display-name>jBPM SLSB Timer Service Bean</display-name>
       <ejb-name>TimerServiceBean</ejb-name>
       <local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
       <local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
       <ejb-class>org.jbpm.scheduler.ejbtimer.TimerServiceBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
       <ejb-ref-name>ejb/LocalTimerServiceBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home>org.jbpm.scheduler.ejbtimer.LocalTimerServiceHome</local-home>
       <local>org.jbpm.scheduler.ejbtimer.LocalTimerService</local>
       <ejb-link>TimerServiceBean</ejb-link>
       </ejb-local-ref>
      </session>
      


      The ejb-local-ref calls were mixed between the two different SLSB

        • 1. Re: Error in ejb-jar.xml
          tom.baeyens

          afaik, the ejb-local-ref elements allow a bean to lookup the other bean. so they should refer to the other bean.

          your correction would enable a bean to lookup itself.

          at least that's what i remember of it. can you run the enterprise test suite ? then make your correction and see if the enterprise test suite still runs after your correction.

          • 2. Re: Error in ejb-jar.xml

            The lookup still works but you're right about this. My bad mistaken the <ejb-ref> for <ejb-local-ref>

            That post can be ignored all in all