• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java.lang.ClassCastException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.lang.ClassCastException


  • Subject: Re: java.lang.ClassCastException
  • From: Christian Pekeler <email@hidden>
  • Date: Wed, 2 Feb 2005 16:22:29 -0700


On Jan 2, 2005, at 15:50, Shravan wrote:
Can anyone tell me why i am getting a ClassCastException at line 1 below

USERS userWithIdentity = (USERS) EOUtilities.objectMatchingKeyAndValue(ec,"USERS","username",aUsername); //(1)

Looks like the entity USERS is not mapped to the class USERS. Check the USERS entity in your EOModel.


Btw, 'USERS' isn't a good name for an entity - you probably want to use singular. And 'USERS' isn't a good class name either - class names in Java aren't supposed to be all caps. I recommend you call both entity and class 'User'.

Christian

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >java.lang.ClassCastException (From: Shravan <email@hidden>)

  • Prev by Date: java.lang.ClassCastException
  • Next by Date: Re: EODataSource confusion :-(
  • Previous by thread: java.lang.ClassCastException
  • Next by thread: EOSharedEditingContext question
  • Index(es):
    • Date
    • Thread