I have created https://issues.apache.org/jira/browse/CALCITE-4492 to address this issue.
@Stamatis Zampetakis <[email protected]> please note that, while the Flink error was observed with Java9, my error was observed with Java8 (on Websphere). On Tue, Feb 9, 2021 at 10:56 PM Stamatis Zampetakis <[email protected]> wrote: > Definitely worth logging/fixing but given that java9 is already EOL [1] I > don't think there are going to be many people impacted by this. > > [1] https://www.oracle.com/java/technologies/java-se-support-roadmap.html > > On Tue, Feb 9, 2021 at 10:38 PM Julian Hyde <[email protected]> > wrote: > > > Can you please log it? Link it to > > https://issues.apache.org/jira/browse/CALCITE-4200 < > > https://issues.apache.org/jira/browse/CALCITE-4200> (if it’s not the > same > > issue) and of course FLINK-19820. > > > > > On Feb 9, 2021, at 8:28 AM, Ruben Q L <[email protected]> wrote: > > > > > > Hello everyone, > > > > > > While testing an application that uses Calcite, I'm getting an error > > when I > > > try to run it on a Websphere9 environment (IBM J9 VM, Java8, Ubuntu) > [1]. > > > It would seem there is an issue around > > > org.apache.calcite.util.ImmutableBeans and the reflection mechanisms > that > > > it uses, in the context of RelRule#Config (and specifically the default > > > method RelRule$Config.as). > > > > > > Googling a bit, I found the following Flink ticket: > > > https://issues.apache.org/jira/browse/FLINK-19820 > > > which has a very similar exception message. In that case it was seen > with > > > Java9 in a Debian environment, and the problem is also around > > > ImmutableBeans in RelBuilder#Config, and again the issue seems > generated > > by > > > a default method (RelBuilder$Config.toBuilder). > > > The Flink ticket was closed as "Won't Fix" just because Flink does not > > > support Java9 (and apparently the issue did not occur with the > > > Flink-supported Java versions), but the underlying Calcite problem was > > > never tackled. > > > > > > Even if Flink does not support Java9, Calcite does, right? Moreover, in > > my > > > case I get the error with Java8 (only in WebSphere). So I guess we > have a > > > potential issue on our side. > > > Has anyone ever seen this problem before? > > > > > > Best regards, > > > Ruben > > > > > > > > > [1] > > > Caused by: java.lang.ExceptionInInitializerError > > > at java.lang.J9VMInternals.ensureError(J9VMInternals.java:141) > > > at > > > > > > java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:130) > > > ... > > > Caused by: java.lang.RuntimeException: while binding method public > > default > > > java.lang.Object > > > com.onwbp.org.apache.calcite.plan.RelRule$Config.as(java.lang.Class) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:285) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:51) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:64) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:61) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) > > > at > > > com.onwbp.com.google.common.cache.LocalCache.get(LocalCache.java:3951) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) > > > at > > > > > > com.onwbp.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:91) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:72) > > > at > > > > > > com.onwbp.org.apache.calcite.plan.RelRule$Config.<clinit>(RelRule.java:121) > > > <Break in method call trace.> > > > ... 73 more > > > Caused by: java.lang.IllegalAccessException: > > > 'com.onwbp.org.apache.calcite.plan.RelRule$Config' no access to: > > > > > > 'com.onwbp.org.apache.calcite.plan.RelRule$Config.as:(Config,Class)Object/invokeSpecial' > > > at > > > > java.lang.invoke.MethodHandles$Lookup.checkAccess(MethodHandles.java:333) > > > at > > > > > > java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:970) > > > at > > > > > > com.onwbp.org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:283) > > > ... 86 more > > > > >
