This week's giveaway is in the Groovy forum.
We're giving away four copies of Groovy Fundamentals video training course and have Ken Kousen on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes org.eclipse.persistence.exceptions.DescriptorException with java.lang.NoSuchField exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.eclipse.persistence.exceptions.DescriptorException with java.lang.NoSuchField exception" Watch "org.eclipse.persistence.exceptions.DescriptorException with java.lang.NoSuchField exception" New topic

org.eclipse.persistence.exceptions.DescriptorException with java.lang.NoSuchField exception

Maulik Modi

Joined: Mar 09, 2011
Posts: 3

I have an Entity named TrainingMstr. I have removed some fields from the table and updated the entity too. But I'm still getting the following error:

Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.IntegrityException

Descriptor Exceptions:

Exception [EclipseLink-59] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The instance variable [trngRevNo] is not defined in the domain class [com.discusit.trims.entity.TrainingMstr], or it is not accessible. Internal Exception: java.lang.NoSuchFieldException: trngRevNo Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[trngRevNo-->trimsdev.trimsdev.training_mstr.trng_rev_no] Descriptor: RelationalDescriptor(com.discusit.trims.entity.TrainingMstr -->

I have removed trngRevNo variable from the database and then updated the entity. Still getting the error while deploying the application.

Can anyone please help me...???
Ashwini Kashyap
Ranch Hand

Joined: Aug 30, 2012
Posts: 90
Hi Maulik,

I suppose you are getting this issue while deployment and therefore you can try removing all folders and sub-folders in "work" folder of the server and deploy again with latest changes.

Thanks and Regards,
Ashwini Kashyap | |

James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
Check if you are using an orm.xml file to map the attribute. It may need to be updated.

Also try restarting your server if you have not done so, and ensure you don't have the class on the classpath twice somehow.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
I agree. Here's the link:
subject: org.eclipse.persistence.exceptions.DescriptorException with java.lang.NoSuchField exception