surinder-insonix / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

java.lang.NullPointerException in JavaQueryCompiler if 'valueType' is null #201

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

In JavaQueryCompiler.java, line 535, the symbol object is queried to get the 
valueType.  If the 
valueType is null for whatever reason, then the "type" variable will also be 
null.  Thus, when the 
"getType()" function is called, a NuceleusException is thrown saying, "Cannot 
access field 
"+fieldName+" on type "+cls.getName()".  (See JavaQueryCompiler.java line 561)

When trying to throw the NuceleusException, the "cls" object is null, which 
actually causes a null-
pointer exception to be thrown instead of the actual error.

What version of the product are you using? On what operating system?
Windows, Appengine 1.3.2 (My Datanucleus source jar is perhaps 1 version 
behind, so my line numbers 
may be a bit off, but this only pertains to browsing the source.  The jar libs 
are whatever comes with 
1.3.2).

Original issue reported on code.google.com by sappenin on 30 Mar 2010 at 4:52

GoogleCodeExporter commented 8 years ago
Shoot.  Just realized this is the wrong project to post this bug.  Any pointers 
on 
where JavaQueryCompiler is housed?

Original comment by sappenin on 30 Mar 2010 at 4:54

GoogleCodeExporter commented 8 years ago
JavaQueryCompiler is presumably org.datanucleus.query.compiler packaged? And 
indeed
in SVN trunk of DataNucleus of that file there is no "valueType" present. 
http://www.datanucleus.org/index.html is the project for that, but we only 
accept
JIRA issues with valid DataNucleus testcases, as defined by
http://www.datanucleus.org/project/problem_jdo_testcase.html

Original comment by googleco...@yahoo.co.uk on 31 Mar 2010 at 12:36

GoogleCodeExporter commented 8 years ago
Ok, I'm using DataNucelus-Core version 1.1.5 as part of Appengine.

Original comment by sappenin on 1 Apr 2010 at 1:28

GoogleCodeExporter commented 8 years ago
Testcase to demonstrate this ? By testcase I mean model class, and persistence 
code

Original comment by googleco...@yahoo.co.uk on 12 Jul 2011 at 6:05

GoogleCodeExporter commented 8 years ago
Since no query is defined nor model objects, have to close this since not 
possible to demonstrate

Original comment by googleco...@yahoo.co.uk on 15 Jul 2011 at 11:19