File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes JPA old entity classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA old entity classes" Watch "JPA old entity classes" New topic
Author

JPA old entity classes

Petr Dusek
Greenhorn

Joined: Nov 26, 2012
Posts: 23
Hi,
I have a small problem with the JPA entity classes, which I had removed and never used any more. I am using Netbeans and if I simply deleted or moved the entity classes, I had to struggle with this problem. There is an exception like "NoClassDefFound" and a message like: cannot find + name the already deleted entity classes. It never mind, because the application deploys normally. But it is still every time in the log of Glass Fish (every deployment the same...). Could you tell me please how to solve this issue? Where is the place, where are the references to the (old - removed) entity classes remaining?

Thank you and sorry for my poor english )
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

Are there references to them in your persistence.xml?


[How To Ask Questions][Read before you PM me]
Petr Dusek
Greenhorn

Joined: Nov 26, 2012
Posts: 23
No, they are not. I explicitly specify the list of active entity classes in the persistence.xml.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

You marked this question as resolved. Did you figure it out?
Petr Dusek
Greenhorn

Joined: Nov 26, 2012
Posts: 23
No, I did it unintentionally. Do you know, how to mark it as unresolved? :-)
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

I marked it as unresolved for you.

Are you deploying from and IDE? Make sure that the application is completely removed from the application server. Perhaps you have stale files or references. Can you post the exact stack trace?
Petr Dusek
Greenhorn

Joined: Nov 26, 2012
Posts: 23
Thanks, I am a really Greenhorn :-).

I am deploying from NetBeans IDE. Ok, I will try to completely remove the application - there is an undeploy-button. Stack trace - yes, but not yet. I will be by my programming PC in the evening.
Petr Dusek
Greenhorn

Joined: Nov 26, 2012
Posts: 23
Probably you were right - it is necessary to undeploy! I have deployd my application just now and no exeption was trown. Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPA old entity classes
 
Similar Threads
Database record deleted when deploying new ear file
Locking and remoteException
Lazy loading exception in presentation layer, what's the nicest way to avoid them?
Is it possible to use JPA 2.0 with EJB 3.0? (not EJB 3.1)?
how to set Eclipse don't build *.class file when errors exist?