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

Reply via email to