Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > CMP question

Reply
Thread Tools

CMP question

 
 
tim@nocomment.com
Guest
Posts: n/a
 
      08-21-2006
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

 
Reply With Quote
 
 
 
 
tim@nocomment.com
Guest
Posts: n/a
 
      08-21-2006
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.


http://www.velocityreviews.com/forums/(E-Mail Removed) 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EJB/CMP entity bean question Donkey Hot Java 3 05-29-2008 06:35 AM
Newbie question about EJB-CMP: is it worth it when using multiplecontainers? Andrea Desole Java 7 11-04-2004 04:55 PM
no cmp field defined in cmp ejb Andrea Sansottera Java 0 07-16-2004 02:24 PM
Automate EJB 2.0 CMP generation from Datasource Andrew Tyson Java 0 07-15-2003 12:44 PM
CMR/CMP and Compound Primary Key Damir Mikoc Java 1 07-04-2003 03:27 AM



Advertisments