CMP question

Discussion in 'Java' started by tim@nocomment.com, Aug 21, 2006.

  1. Guest

    I'm trying to use a CMP based getter (getFname()). During compile
    phase, I am getting the message that it "cannot find symbol". Since I
    can use these definitions to do the actual creation and removal of the
    data on the database, why would this simple getter not work?
    If I comment out the line I am having trouble with, everything
    compiles, builds and runs as I think it should.

    Cmp definition in entity bean:

    @CmpField(column = "fname")
    public abstract String getFname();
    public abstract void setFname(String val);

    Code snippet from client application:

    pe = findOrCreatePeople(pId, fName, lName); // this works
    String tempName = pe.getFname(); // this does not
    work "cannot find symbol"
    pe.remove(); //
    this works


    Thanks,
    Tim
    , Aug 21, 2006
    #1
    1. Advertising

  2. Guest

    The program I was using as a template referenced that getter from
    within the entity bean and created a getter which could then be
    accessed by a client program.


    wrote:
    > I'm trying to use a CMP based getter (getFname()). During compile
    > phase, I am getting the message that it "cannot find symbol". Since I
    > can use these definitions to do the actual creation and removal of the
    > data on the database, why would this simple getter not work?
    > If I comment out the line I am having trouble with, everything
    > compiles, builds and runs as I think it should.
    >
    > Cmp definition in entity bean:
    >
    > @CmpField(column = "fname")
    > public abstract String getFname();
    > public abstract void setFname(String val);
    >
    > Code snippet from client application:
    >
    > pe = findOrCreatePeople(pId, fName, lName); // this works
    > String tempName = pe.getFname(); // this does not
    > work "cannot find symbol"
    > pe.remove(); //
    > this works
    >
    >
    > Thanks,
    > Tim
    , Aug 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Damir Mikoc

    CMR/CMP and Compound Primary Key

    Damir Mikoc, Jul 3, 2003, in forum: Java
    Replies:
    1
    Views:
    549
    Christopher Blunck
    Jul 4, 2003
  2. Andrew Tyson
    Replies:
    0
    Views:
    374
    Andrew Tyson
    Jul 15, 2003
  3. Andrea Sansottera

    no cmp field defined in cmp ejb

    Andrea Sansottera, Jul 16, 2004, in forum: Java
    Replies:
    0
    Views:
    373
    Andrea Sansottera
    Jul 16, 2004
  4. Andrea Desole
    Replies:
    7
    Views:
    657
    Andrea Desole
    Nov 4, 2004
  5. Donkey Hot

    EJB/CMP entity bean question

    Donkey Hot, May 27, 2008, in forum: Java
    Replies:
    3
    Views:
    404
    Arved Sandstrom
    May 29, 2008
Loading...

Share This Page