[英]QueryDSL NumberPath/SimplePath mixup on x64/x86
We are having this weird problem (or maybe we are missing some parameter configuration) that if we compile our project using a x86 JVM everything works OK, but if we use a x64 JVM we get this error during compilation: 我们有这个奇怪的问题(或者我们可能缺少一些参数配置)如果我们使用x86 JVM编译我们的项目一切正常,但是如果我们使用x64 JVM,我们在编译期间会遇到这个错误:
QT_LOG.java:66: incompatible types
found : com.mysema.query.types.path.NumberPath<java.lang.Long>
required: com.mysema.query.types.path.SimplePath<java.lang.Long>
public final SimplePath<Long> id = _super.id;
This behavior happens if we use ANT as described in here: http://www.querydsl.com/static/querydsl/3.4.3/reference/html/ch02.html#d0e147 如果我们使用ANT,就会发生这种情况,如下所述: http : //www.querydsl.com/static/querydsl/3.4.3/reference/html/ch02.html#d0e147
<javac includeantruntime="false" debug="true" debuglevel="source,lines,vars"
fork="yes" executable="...x86...or...x64...JAVAC" classpathref="My Project.classpath"
source="1.6" target="1.6" encoding="iso-8859-1" >
<compilerarg value="-proc:only"/>
<compilerarg value="-processor"/>
<compilerarg value="com.mysema.query.apt.jpa.JPAAnnotationProcessor"/>
<compilerarg value="-s"/>
<compilerarg value="c:/myPath/"/>
<src path="${mySourceFolder}" />
</javac>
If we use Eclipse, we also get the different values (NumberPath/SimplePath) but we don't get any error. 如果我们使用Eclipse,我们也会获得不同的值(NumberPath / SimplePath),但我们不会收到任何错误。
What can we do to fix this? 我们可以做些什么来解决这个问题?
Tested with QueryDSL 3.2.3 and 3.4.3. 使用QueryDSL 3.2.3和3.4.3进行测试。
This appears to be a bug in querydsl-jpa-?.?.?-apt-hibernate-one-jar.jar since I removed all dependencies to it and added references to the following individual jars: 这似乎是querydsl-jpa中的一个错误 - ?。?。? - apt-hibernate-one-jar.jar,因为我删除了所有依赖项并添加了对以下单个jar的引用:
QueryDSL 3.2.3 QueryDSL 3.2.3
codegen-0.6.0.jar
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-core-4.2.0.Final.jar
hibernate-entitymanager-4.2.0.Final.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-validator-4.3.0.Final.jar
javassist-3.15.0-GA.jar
javax.persistence-2.0.4.v201112161009.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
mysema-commons-lang-0.2.4.jar
querydsl-apt-3.2.4.jar
querydsl-codegen-3.2.4.jar
querydsl-core-3.2.4.jar
querydsl-jpa-3.2.4-apt.jar
querydsl-jpa-3.2.4.jar
querydsl-sql-3.2.4.jar
QueryDSL 3.4.3 QueryDSL 3.4.3
codegen-0.6.3.jar
hibernate-commons-annotations-4.0.4.Final.jar
hibernate-core-4.3.5.Final.jar
hibernate-entitymanager-4.3.5.Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
hibernate-validator-4.3.1.Final.jar
javassist-3.18.1-GA.jar
javax.persistence-2.1.0.jar
jboss-transaction-api_1.2_spec-1.0.0.Final.jar
mysema-commons-lang-0.2.4.jar
querydsl-apt-3.4.3.jar
querydsl-codegen-3.4.3.jar
querydsl-core-3.4.3.jar
querydsl-jpa-3.4.3-apt.jar
querydsl-jpa-3.4.3.jar
querydsl-sql-3.4.3.jar
and everything compiles correctly now 现在一切都正确编译了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.