Deploying an Entity Bean in BEA's Weblogic

Discussions

EJB programming & troubleshooting: Deploying an Entity Bean in BEA's Weblogic

  1. Deploying an Entity Bean in BEA's Weblogic (4 messages)

    Hi

    I am new to EJB and was trying to deploy an entity bean in weblogic. The primary key is a class and I am using CMP. Also the Container Managed Field is an int.

    When I try to deploy my solution I get the following error:

    C:\WINNT\Profiles\SRamadoss\.ejbdeployer\deployer-projects\cabin\ejb-jar\com\titan\cabin\CabinBeanEOImpl.java:56: Incompatible type for =. Can't convert int to com.titan.cabin.CabinPK.

    pk = bean.id;

       ^

    1 error

    I have a no argument constructor and a constructor that takes an int in the primary key class. Can someone help me here please..

    Thanx
    Shiva
  2. Hi Shiva,
       the field u r having as primary key can't be a primitive type like int. change that to Integer. now it will work.

    thanks..hasan
    (ahamed at aztec dot soft dot net)
  3.  While generating the container through the developer tool, and while filling out the persistence details u r probably giving primary key field as id. Leave the primary key field as (none) becoz u have already given primary key type. This will remove the error.

    Sumit
  4. Thanks Sumit

    It works fine.. Say, do you know of a good tutorial site or book for BEA's WebLogic because looking at their documentation sometimes doesn't help..

    Thanks once again
    Shiva
  5. I know that the documentation doesn't help sometimes but then its the only thing which we have. Serverside.com is the best option for any kind of help, so keep posting problems while working.

    sumit