Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 304602

Summary: Annotation Processing under Aspectj / MetadataAsmFactory
Product: z_Archived Reporter: Sven Uhlig <s-b-u>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: andrew, guy.pelletier, hansharz_bugzilla, lomakin.andrey, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sven Uhlig CLA 2010-03-03 19:25:10 EST
Aspecj-Tools produces an attribute of type org.aspectj.weaver.MethodDeclarationLineNumber after annotations on methods, which skips its further processing in 
org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.ClassMetadataVisitor#addAnnotations.
I've only tried it with @PostUpdate/@PostPersist which didn't work, but it seem to be a generally issue.
Comment 1 Eric Gwin CLA 2010-03-04 06:37:36 EST
This looks like it is actually a bug against the modelgen feature. Reassigning to Tom for review.
Comment 2 Tom Ware CLA 2010-03-04 09:09:51 EST
reassigning to general mailbox for triage
Comment 3 Tom Ware CLA 2010-03-05 10:50:05 EST
How do I reproduce this problem?
Comment 4 Tom Ware CLA 2010-03-12 09:43:09 EST
Setting target and priority.  See the following page for details of what this means:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 5 Sven Uhlig CLA 2010-03-12 13:02:01 EST
(In reply to comment #3)
> How do I reproduce this problem?
Hi Tom,
Sorry for the late response.
Just create a new jpa-project, add an entity with a @PostPersist annotation. Now convert to an Aspectj-Project and persist one new entity. You will see, that the postpersist-method will not be executed.
Comment 6 Andrew Rustleund CLA 2010-10-07 11:41:04 EDT
Please see bug ids 324862 and 324408 as these seem to all be being caused by the same issue. Bug id 324862 has a code snippet with a fix for this issue.
Comment 7 Guy Pelletier CLA 2010-12-29 15:53:14 EST
*** Bug 324408 has been marked as a duplicate of this bug. ***
Comment 8 Guy Pelletier CLA 2010-12-29 15:55:01 EST
Closing as duplicate of 324862

*** This bug has been marked as a duplicate of bug 324862 ***
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:32:01 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink