Issue Details (XML | Word | Printable)

Key: NUCJPA-120
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: FireSign
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
DataNucleus API JPA

Incomplete JPA Query causes NPE

Created: 21/Mar/11 09:09 PM   Updated: 13/Aug/12 03:16 PM   Resolved: 01/Apr/11 05:24 PM
Component/s: API
Affects Version/s: 2.1.7
Fix Version/s: 3.0.0.m3

File Attachments: 1. Zip Archive (4 kB)

Windows XP, Java 1.6.0_21-b07

Datastore: HSQL
Severity: Proof of Concept

 Description  « Hide
The following JPA Query is incomplete, and throws a NullPointerException.
Expected behaviour: some more meaningful Exception.

"select p from Product"

Exception in thread "main" java.lang.NullPointerException
at org.datanucleus.query.compiler.JavaQueryCompiler.getType(
at org.datanucleus.query.compiler.JavaQueryCompiler.getType(
at org.datanucleus.query.symbol.SymbolTable.getType(
at org.datanucleus.query.expression.PrimaryExpression.bind(
at org.datanucleus.query.compiler.JavaQueryCompiler.compileResult(
at org.datanucleus.query.compiler.JPQLCompiler.compile(
at org.datanucleus.jpa.JPAQuery.getResultList(

Sort Order: Ascending order - Click to sort in descending order
FireSign added a comment - 21/Mar/11 09:10 PM
Attaching test program.

Andy Jefferson added a comment - 01/Apr/11 05:24 PM
Current SVN gives a correct user-error exception.