Issue Details (XML | Word | Printable)

Key: NUCJDOQUERY-8
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Michael Bouschen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus JDO Query Processor

NPE in JDOQueryProcessor.isJDOAnnotated when processing PersistenceCapable interface with inheritance

Created: 22/Apr/11 02:33 PM   Updated: 06/Jul/12 09:43 AM   Resolved: 22/Apr/11 05:23 PM
Component/s: None
Affects Version/s: 3.0.0.m1
Fix Version/s: 2.2.2, 3.0.0.m2

File Attachments: 1. Zip Archive NPE-APT-PCInterfaces.zip (4 kB)


Severity: Development


 Description  « Hide
I get a NPE in JDOQueryProcessor.isJDOAnnotated when using the DataNucleus annotation processor to generate query classes from PersistenceCapabe interfaces. The PC interface causing the NPE inherits from another PC interface:
  @PersistenceCapable
  public interface B extends A { }

Here is the stacktrace:
java.lang.NullPointerException
at org.datanucleus.jdo.query.JDOQueryProcessor.isJDOAnnotated(JDOQueryProcessor.java:669)
at org.datanucleus.jdo.query.JDOQueryProcessor.getPersistentSupertype(JDOQueryProcessor.java:655)
at org.datanucleus.jdo.query.JDOQueryProcessor.processClass(JDOQueryProcessor.java:160)
at org.datanucleus.jdo.query.JDOQueryProcessor.process(JDOQueryProcessor.java:134)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625)

Environment:
- maven-datanucleus-plugin version 3.0.0-m1
- dependencies:
  -- datanucleus-core version 3.0.0-m3
  -- datanucleus-api-jdo version 3.0.0-m3
  -- datanucleus-jdo-query version 3.0.0-m1
  -- jdo-api version 3.1-SNAPSHOT

Michael Bouschen added a comment - 22/Apr/11 02:35 PM
PC interfaces to reproduce the NPE.
File Stacktarce.txt contains the mvn install output including the stacktrace.

Michael Bouschen made changes - 22/Apr/11 02:35 PM
Field Original Value New Value
Attachment NPE-APT-PCInterfaces.zip [ 11435 ]
Andy Jefferson added a comment - 22/Apr/11 05:23 PM
SVN trunk works on that

Andy Jefferson made changes - 22/Apr/11 05:23 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0.0.m2 [ 11230 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 08/May/11 12:05 PM
Fix Version/s 2.2.2 [ 11241 ]
Andy Jefferson made changes - 06/Jul/12 09:43 AM
Status Resolved [ 5 ] Closed [ 6 ]