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

Sort Order: Ascending order - Click to sort in descending order
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.

Andy Jefferson added a comment - 22/Apr/11 05:23 PM
SVN trunk works on that