my2iu / Jinq

LINQ-style queries for Java 8
Other
660 stars 71 forks source link

Java 10 support #71

Closed nghexuanchien closed 6 years ago

nghexuanchien commented 6 years ago

I tried using JDK 10 with ASM 6.1.1, the query is broken

Caused by: java.lang.IllegalArgumentException: Could not translate code to a query at jinq.jpa@1.8.23/org.jinq.jpa.JPAQueryComposer.translationFail(JPAQueryComposer.java:113) at jinq.jpa@1.8.23/org.jinq.jpa.JPAQueryComposer.applyTransformWithLambda(JPAQueryComposer.java:300) at jinq.jpa@1.8.23/org.jinq.jpa.JPAQueryComposer.where(JPAQueryComposer.java:449) at jinq.jpa@1.8.23/org.jinq.jpa.JPAQueryComposer.where(JPAQueryComposer.java:63) at api@1.8.23/org.jinq.orm.stream.QueryJinqStream.where(QueryJinqStream.java:45) at jinq.jpa@1.8.23/org.jinq.jpa.QueryJPAJinqStream.where(QueryJPAJinqStream.java:106) at jinq.jpa@1.8.23/org.jinq.jpa.QueryJPAJinqStream.where(QueryJPAJinqStream.java:15) at com.retailshop.db.dao.impl.OrderDAO.findByStatus(OrderDAO.java:63) at com.retailshop.db.dao.impl.OrderDAO.findRecentSaleOrders(OrderDAO.java:37) at com.retailshop.db.dao.impl.OrderDAO.findRecentSaleOrders(OrderDAO.java:32) at com.retailshop.db.dao.impl.OrderDAO$$FastClassBySpringCGLIB$$837986ae.invoke() at spring.core@5.0.5.RELEASE/org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at spring.aop@5.0.5.RELEASE/org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747) at spring.aop@5.0.5.RELEASE/org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at spring.tx@5.0.5.RELEASE/org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ... 70 more

my2iu commented 6 years ago

Can you supply the query code and the full stack trace (Jinq will usually report more detailed information later in the stack trace)?

Also, how did you include the ASM 6.1.1? The version in Maven includes its own copy of ASM, but I haven't gotten around to releasing a new version with the updated copy of ASM 6.1.1 yet (I was thinking of doing it later this week). So you need to recompile everything from source to get a version that uses ASM 6.1.1.

my2iu commented 6 years ago

I've released a new 1.8.24 version of Jinq into Maven Central that includes ASM 6.1.1. It usually takes a few hours before it is downloadable by others though. I haven't had the time to test Java 10 yet, so I don't know if that's enough to get things to work in Java 10. Please let me know if it fixes things for you.

my2iu commented 6 years ago

Version 1.8.24 with ASM 6.1.1 is now available for download from Maven Central.

nghexuanchien commented 6 years ago

I tried with 1.8.24 and it worked like a charm now. Thank you so much