Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Re: @ReturnInsert on a MappedSuperClass won'tweave on EL 2.0

Hi Tim,
 
The fix is in the 2.1 stream but does not appear to be in the 2.0 (2.0.1 and 2.0.2) stream. You may want to open a bug to backport the fix to 2.0.3.
 
In the mean time if you specify the read-only explicitly you'll avoid the NPE.
 
Cheers,
Guy
----- Original Message -----
Sent: Monday, April 05, 2010 8:27 AM
Subject: [eclipselink-users] Re: @ReturnInsert on a MappedSuperClass won'tweave on EL 2.0

Ok, I stopped being lazy and looked at the source :)

The problem is the default value of the @ReturnInsert attribute returnOnly is not being defaulted causing an NPE. So looks like this probably is a bug, it would be nice if the javadocs explained exactly what the returnOnly attribute did as well.

./tch


On Mon, Apr 5, 2010 at 8:16 AM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
I have a MappedSuperclass that defines a column as 

@ReturnInsert , this worked fine in EL 1.1 , I'm attempting to upgrade to 2.0 and if I use static weaving or dynamic weaving I get this error, before I file a bug anyone have any idea why this would happen?

Trace"

 [weave] at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicAccessor.processReturnInsert(BasicAccessor.java:391)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.processReturnInsertAndUpdate(MappingAccessor.java:1545)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicAccessor.process(BasicAccessor.java:309)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.processAccessors(MetadataDescriptor.java:1287)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.processAccessors(ClassAccessor.java:825)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.MappedSuperclassAccessor.processMetamodelDescriptor(MappedSuperclassAccessor.java:900)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage2(MetadataProject.java:1324)
    [weave] at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:461)
    [weave] at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.buildTransformer(StaticWeaveClassTransformer.java:160)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.buildClassTransformers(StaticWeaveClassTransformer.java:123)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.<init>(StaticWeaveClassTransformer.java:81)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:237)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:161)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.start(StaticWeaveAntTask.java:203)
    [weave] at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.execute(StaticWeaveAntTask.java:168)
    [weave] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [weave] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [weave] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [weave] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [weave] at java.lang.reflect.Method.invoke(Method.java:597)
    [weave] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [weave] at org.apache.tools.ant.Task.perform(Task.java:348)
    [weave] at org.apache.tools.ant.Target.execute(Target.java:357)
    [weave] at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [weave] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [weave] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    [weave] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [weave] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    [weave] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [weave] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
    [weave] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)


./tch


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top