Problem with deployment

Discussions

EJB programming & troubleshooting: Problem with deployment

  1. Problem with deployment (6 messages)

    Hi,

    I'm deploying an EJB with EJB Deployer tool, and this occurs:

    "the create method create() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public."

    And I have both methods, create() and ejbCreate(), and the ejbCreate() method is public. Why could be the reason? Can anybody help me to know the real reason?

    Thanks in advance,

    Poli

    Threaded Messages (6)

  2. Problem with deployment[ Go to top ]

    Check the parameters and return type of create / ejbCreate / ejbPostCreate methods
  3. Problem with deployment[ Go to top ]

    Hi, Zavier,

    Must create() and ejbCreate() return the same return type?


    Regards,

    Poli
  4. Problem with deployment[ Go to top ]

    create should return remote interface type,
    ejbCreate should return for session bean -> void,
    for entity -> bean's primary key or any valid java RMI-IIOP type. Same arguments as its Home interface create method.
    ejbPostCreate -> return type should be void.
    Same arguments as its Home interface create method.
  5. Problem with deployment[ Go to top ]

    Hi, Zavier,

    what you've said it's all right in my EJB, possibly maybe something in the deployment descriptor?

    Thanks and regards,

    Poli
  6. Problem with deployment[ Go to top ]

    Yeap ! you check the DD
    <prim-key-class>
    <primkey-field>
    if you don't have your custom primary key class, you can use wrapper class of the type you returned in the ejb-create method, like java.lang.Integer or java.lang.String
  7. Problem with deployment[ Go to top ]

    Hi, Zavier,

    but my bean is a Session Bean, do I need <prim-key-class> and <primkey-field>?

    Regards,

    Poli