openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-336) PCEnhancer throws an NPE when run with DefaultAccessType=PROPERTY on a MappedSuperclass
Date Fri, 24 Aug 2007 21:27:33 GMT
PCEnhancer throws an NPE when run with DefaultAccessType=PROPERTY on a MappedSuperclass
---------------------------------------------------------------------------------------

                 Key: OPENJPA-336
                 URL: https://issues.apache.org/jira/browse/OPENJPA-336
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.0.0
            Reporter: Marc Prud'hommeaux


With the following class:

package test;
import javax.persistence.*;
@MappedSuperclass public abstract class MyMappedSuperclass {
    public void doSometing() { }
}

Running the PCEnhancer with DefaultAccessType=PROPERTY as follows:

java org.apache.openjpa.enhance.PCEnhancer -MetaDataFactory 'jpa(DefaultAccessType=PROPERTY)'
-Log DefaultLevel=TRACE test.MyMappedSuperclass

Causes an NPE:

Exception in thread "main" <openjpa-1.0.0-r420667:568385 nonfatal general error> org.apache.openjpa.util.GeneralException:
null
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:470)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4342)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4284)
        at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:4256)
Caused by: java.lang.NullPointerException
        at org.apache.openjpa.enhance.PCEnhancer.toBackingFieldName(PCEnhancer.java:3664)
        at org.apache.openjpa.enhance.PCEnhancer.getfield(PCEnhancer.java:3578)
        at org.apache.openjpa.enhance.PCEnhancer.addDetachedStateMethods(PCEnhancer.java:3540)
        at org.apache.openjpa.enhance.PCEnhancer.addAttachDetachCode(PCEnhancer.java:3492)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:457)
        ... 3 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message