0 Replies Latest reply on Dec 15, 2004 8:39 PM by nimpt nimpt

    no matching of session bean's local home interface with ejbC

    nimpt nimpt Newbie

      I've got the same problem! I'm using JBoss 4.0RC1! Normally the create() method in session bean's local home should returns the local interface, doesn't it? Thanks for helping me!


      Matching ejbCreate(...) method in the session bean's class
      Subject: Matching ejbCreate(...) method in the session bean's class
      From: Cristian Alejandro Rossel Moraga <cristianrosselm@xxxxxxx>
      Date: Mon, 22 Nov 2004 00:47:30 -0300

      Hello guys from chile!!!

      I am following the http://www.tusc.com.au tutorial (http://www.tusc.com.au/tutorial/html/chap4.html), chapter 4 "Creating a Stateful Session Bean". I choose New and EJB Creation Wizard, in EJB Session statefull, and not create the method ejbCreate() in the file StoreAccessStateSession.

      I working with eclipse 3.01 (so, I test 3.0), and lomboz 3 (so, I test lomboz301), and jboss 3.2.6, jdk1.5.

      Can you help me, please?


      Cristian Rossel

      //---------------------- StoreAccessStateBean --------------------------
      package au.com.tusc.sessionState;

      import javax.ejb.SessionBean;
      import javax.ejb.SessionContext;

      * <!-- begin-xdoclet-definition -->
      * @ejb.bean name="StoreAccessState"
      * jndi-name="StoreAccessState"
      * type="Stateful"
      * transaction-type="Container"
      * @ejb.dao class="au.com.tusc.sessionState.StoreAccessStateDAO"
      * impl-class="au.com.tusc.dao.StoreAccessDAOImpl"
      * @ejb.resource-ref res-ref-name="jdbc/PostgresDS"
      * res-type="javax.sql.Datasource"
      * res-auth="Container"
      * @jboss.resource-ref res-ref-name="jdbc/PostgresDS"
      * jndi-name="java:/PostgresDS"
      * @jboss.container-configuration name="Standard Stateful SessionBean"
      * <!-- end-xdoclet-definition -->
      * @generated
      public abstract class StoreAccessStateBean implements javax.ejb.SessionBean{

      * @ejb.create-method
      * view-type="remote"
      public void ejbCreate(String userID) throws javax.ejb.CreateException{
      System.out.println("Entrando a StoreAccessStateBean.ejbCreate()");
      this.userID= userID;
      System.out.println("Dejando StoreAccessStateBean.ejbCreate()");

      //------------------------ JBoss 3.2.6 -------------------------------
      00:40:53,504 INFO [Server] JBoss (MX MicroKernel) [3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106)] Started in 55s:368ms
      00:41:22,333 WARN [verifier] EJB spec violation:
      Bean : StoreAccessState
      Method : public abstract StoreAccessStateLocal create() throws CreateException
      Section: 7.10.8
      Warning: Each create(...) method in the session bean's local home interface must have a matching ejbCreate(...) method in the session bean's class.

      00:41:22,353 ERROR [MainDeployer] could not create deployment: file:/usr/local/jboss-3.2.6/server/default/deploy/MyStoreMgr.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)


      Matching ejbCreate(...) method in the session bean's class, Cristian Alejandro Rossel Moraga