Issue Details (XML | Word | Printable)

Key: NUCJDOQUERY-10
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Unassigned
Reporter: Stephane Passignat
Votes: 0
Watchers: 1
Operations

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

Annotation processor chokes on arrays

Created: 25/Aug/11 04:51 PM   Updated: 26/Aug/11 11:44 AM   Resolved: 26/Aug/11 12:12 AM
Component/s: None
Affects Version/s: 3.0.0.release
Fix Version/s: None

Environment: 3.0.0 m5

Severity: Development


 Description  « Hide
Hi,
The problem still appears on m5.

thanks,
stephane


Stephane Passignat added a comment - 25/Aug/11 04:52 PM

Andy Jefferson added a comment - 26/Aug/11 12:12 AM
If you have an issue with an issue you raise it on that issue

Andy Jefferson made changes - 26/Aug/11 12:12 AM
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Resolution Won't Fix [ 2 ]
Stephane Passignat added a comment - 26/Aug/11 09:21 AM
here is the stacktrace of the build.

Information:Round 1:
Information: input files: {cases.enhancer.Product, cases.enhancer.NUCJDOQUERY_10}
Information: annotations: [javax.jdo.annotations.PersistenceCapable, javax.jdo.annotations.DatastoreIdentity, org.junit.Test]
Information: last round: false
Information:An annotation processor threw an uncaught exception.
Information:Consult the following stack trace for details.
Information:java.lang.NullPointerException
Information: at org.datanucleus.jdo.query.JDOQueryProcessor.isJDOAnnotated(JDOQueryProcessor.java:670)
Information: at org.datanucleus.jdo.query.JDOQueryProcessor.getExpressionInterfaceNameForType(JDOQueryProcessor.java:487)
Information: at org.datanucleus.jdo.query.JDOQueryProcessor.processClass(JDOQueryProcessor.java:251)
Information: at org.datanucleus.jdo.query.JDOQueryProcessor.process(JDOQueryProcessor.java:135)
Information: at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625)
Information: at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554)
Information: at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699)
Information: at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
Information: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:353)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:279)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:270)
Information: at com.sun.tools.javac.Main.compile(Main.java:69)
Information: at com.sun.tools.javac.Main.main(Main.java:54)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Information: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Information: at java.lang.reflect.Method.invoke(Method.java:597)
Information: at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:70)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 3

Stephane Passignat added a comment - 26/Aug/11 09:25 AM
here is the pc class. I would prefer to add it as attachment but it seems I can't, maybe because the issue is closed.

stephane



package cases.enhancer;

import javax.jdo.annotations.*;

/**
 * @author Stephane Passignat
 * @since 2011/08/25
 */
@PersistenceCapable(identityType = IdentityType.DATASTORE)
@DatastoreIdentity(strategy = IdGeneratorStrategy.INCREMENT)
public class Product {
String[] name;

public String[] getName() {
return name;
}

public void setName(String[] name) {
this.name = name;
}

}

Stephane Passignat added a comment - 26/Aug/11 09:25 AM
there is also a package.jdo file:
<jdo>
<package name="cases.enhancer">
<class name="Product" identity-type="datastore"/>
</package>
</jdo>


Andy Jefferson added a comment - 26/Aug/11 09:48 AM
And if you bother looking at the code in 3.0.0.release
http://datanucleus.svn.sourceforge.net/viewvc/datanucleus/platform/jdo.query/trunk/src/java/org/datanucleus/jdo/query/JDOQueryProcessor.java?revision=13115&view=markup

you can see you claim an NPE at line 670, and that can only happen if the TypeElement passed in is null. Yet you go back to the line calling it (line 487) and null is checked for.

Conclusion : you're not using 3.0.0.release.

Stephane Passignat added a comment - 26/Aug/11 10:15 AM
here are the jars present used for the build:

 Le volume dans le lecteur C s'appelle OS
 Le num‚ro de s‚rie du volume est 581A-8D23

 R‚pertoire de C:\Projects\datanucleus\lib\datanucleus

26/08/2011 10:14 <REP> .
26/08/2011 10:14 <REP> ..
14/06/2011 08:18 43ÿ578 asm-3.3.jar
14/06/2011 08:18 148ÿ817 commons-dbcp-1.3.jar
14/06/2011 08:18 100ÿ193 commons-pool-1.5.5.jar
14/06/2011 08:18 313ÿ773 datanucleus-api-jdo-3.0.0-m5.jar
14/06/2011 08:18 240ÿ166 datanucleus-api-jpa-3.0.0-m5.jar
14/06/2011 08:18 52ÿ474 datanucleus-api-json-3.0.0-m5.jar
14/06/2011 08:18 13ÿ270 datanucleus-api-rest-3.0.0-m2.jar
14/06/2011 08:18 36ÿ028 datanucleus-cache-3.0.0-m3.jar
14/06/2011 08:18 1ÿ705ÿ002 datanucleus-core-3.0.0-m5.jar
14/06/2011 08:18 66ÿ737 datanucleus-db4o-3.0.0-m3.jar
14/06/2011 08:18 75ÿ389 datanucleus-db4o-sql-3.0.0-m2.jar
14/06/2011 08:18 191ÿ400 datanucleus-enhancer-3.0.0-m5.jar
14/06/2011 08:18 54ÿ730 datanucleus-excel-3.0.0-m5.jar
14/06/2011 08:18 18ÿ147 datanucleus-googlecollections-3.0.0-m3.jar
14/06/2011 08:18 90ÿ347 datanucleus-hbase-3.0.0-m5.jar
14/06/2011 08:18 22ÿ864 datanucleus-javaxtime-3.0.0-m1.jar
14/06/2011 08:18 15ÿ013 datanucleus-jdo-query-3.0.0-m2.jar
14/06/2011 08:18 31ÿ201 datanucleus-jodatime-3.0.0-m2.jar
14/06/2011 08:18 13ÿ711 datanucleus-jpa-query-3.0.0-m1.jar
14/06/2011 08:18 82ÿ120 datanucleus-json-3.0.0-m5.jar
14/06/2011 08:18 120ÿ662 datanucleus-ldap-3.0.0-m4.jar
14/06/2011 08:18 11ÿ304 datanucleus-management-1.0.2.jar
14/06/2011 08:18 77ÿ349 datanucleus-mongodb-3.0.0-m5.jar
14/06/2011 08:18 64ÿ448 datanucleus-neodatis-3.0.0-m3.jar
14/06/2011 08:18 55ÿ696 datanucleus-odf-3.0.0-m5.jar
14/06/2011 08:18 1ÿ379ÿ410 datanucleus-rdbms-3.0.0-m5.jar
14/06/2011 08:18 284ÿ390 datanucleus-spatial-3.0.0-m1.jar
14/06/2011 08:18 56ÿ919 datanucleus-xml-3.0.0-m4.jar
14/06/2011 08:18 5ÿ389 datanucleus-xmltypeoracle-3.0.0-m1.jar
14/06/2011 08:18 2ÿ441ÿ396 db4o-7.12.126.14142-all-java5.jar
14/06/2011 08:18 650ÿ466 ehcache-core-2.2.0.jar
26/08/2011 10:14 0 files.txt
14/06/2011 08:18 48ÿ995 flexjson-1.7.jar
14/06/2011 08:18 114ÿ863 geronimo-jpa_2.0_spec-1.0.jar
14/06/2011 08:18 15ÿ649 geronimo-jta_1.1_spec-1.1.jar
14/06/2011 08:18 639ÿ592 google-collections-1.0.jar
14/06/2011 08:18 2ÿ687ÿ928 hadoop-core-0.20.2.jar
14/06/2011 08:18 2ÿ231ÿ855 hbase-0.90.0.jar
14/06/2011 08:18 638ÿ569 hsqldb-1.8.0.4.jar
14/06/2011 08:18 89ÿ967 jaxb-api-2.1.jar
14/06/2011 08:18 849ÿ481 jaxb-impl-2.1.jar
14/06/2011 08:18 219ÿ151 jdo-api-3.1-SNAPSHOT-20110319.jar
14/06/2011 08:18 534ÿ827 joda-time-1.6.jar
14/06/2011 08:18 367ÿ444 log4j-1.2.14.jar
14/06/2011 08:18 243ÿ993 mongo-java-driver-2.5.2.jar
14/06/2011 08:18 771ÿ168 neodatis-odb-1.9.30.689.jar
14/06/2011 08:18 3ÿ350ÿ508 odfdom-java-0.8.7.jar
14/06/2011 08:18 1ÿ539ÿ291 poi-3.6.jar
14/06/2011 08:18 412ÿ783 poi-ooxml-3.6.jar
14/06/2011 08:18 22ÿ338 slf4j-api-1.5.6.jar
14/06/2011 08:18 9ÿ678 slf4j-log4j12-1.5.6.jar
14/06/2011 08:18 455ÿ657 time-api-0.6.3.jar
14/06/2011 08:18 1ÿ212ÿ965 xercesImpl-2.8.1.jar
              53 fichier(s) 24ÿ919ÿ091 octets
               2 R‚p(s) 361ÿ527ÿ652ÿ352 octets libres

Andy Jefferson added a comment - 26/Aug/11 10:19 AM
So to paraphrase this "user raises issue against version 3.0.0.release yet is actually using 3.0.0.m2, the version *before* some bug was fixed". FFS

Stephane Passignat added a comment - 26/Aug/11 11:44 AM
sorry about this, I've said it's on 3.0.0m5 (what I've downloaded). I've mentioned 3.0.0 released as I didn't find m5 in the options.

I report the case in this module because similar cases are reported here. As the issue occurs during build i've associated it to enhancer side effect enhancer jar is tagged as m5.

All the modules doesn't make the stuff easy.

thanks,
stephane