Mantis - Resin
Viewing Issue Advanced Details
1622 major always 02-21-07 12:58 03-29-07 13:30
jarnbjo  
ferg  
normal  
closed 3.1.0  
fixed  
none    
none 3.1.1  
0001622: Amber fails if entity classes are referred in <resource> tags in dep. descriptor.
I have the following situation:

I am declaring and configuring different objects in the deployment descriptor using <resource> tags. These classes are directly or indirectly referring to persistent entity classes (annotated with javax.persistence.Entity). In this case, the Amber enhancement of these classes seem to be skipped. The database tables are created (if not already present), classes are generated in work/pre-enhance, but work/post-enhance is not even created and trying to use the classes through the entity manager causes the following exception to be thrown:

java.lang.IllegalArgumentException: persist() operation can only be applied
to an entity instance. If the argument is an entity, the corresponding
class must be specified in the scope of a persistence unit.

If I remove the <resource> tags from the deployment descriptor, the entity classes are enhanced and the persistence API works as expected.

Notes
(0001794)
ferg   
03-29-07 13:30   
jpa/0s60