flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shannon Carey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5690) protobuf is not shaded properly
Date Tue, 09 May 2017 00:03:04 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001826#comment-16001826

Shannon Carey commented on FLINK-5690:

Regarding the comment:

Mh, that's weird. According to this answer (http://stackoverflow.com/questions/7076414/java-lang-illegalaccesserror-tried-to-access-method)
the IllegalAccessError is caused by compile time / runtime version mismatches, not by different

You might get IllegalAccessError if the class or method is eg. protected or default scope
(not public or private) and the class trying to access it is in the same package but from
a different classloader. We're having this problem when we try to use a more recent version
of Typesafe Config, and I'm not sure why it's not using the user code classloader provided
via Thread#setContextClassLoader().

> protobuf is not shaded properly
> -------------------------------
>                 Key: FLINK-5690
>                 URL: https://issues.apache.org/jira/browse/FLINK-5690
>             Project: Flink
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 1.1.4, 1.3.0
>            Reporter: Andrey
>            Assignee: Robert Metzger
> Currently distributive contains com/google/protobuf package. Without proper shading client
code could fail with:
> {code}
> Caused by: java.lang.IllegalAccessError: tried to access method com.google.protobuf.XXXX
> {code}
> Steps to reproduce:
> * create job class "com.google.protobuf.TestClass"
> * call com.google.protobuf.TextFormat.escapeText(String) method from this class
> * deploy job to flink cluster (usign web console for example)
> * run job. In logs IllegalAccessError.
> Issue in package protected method and different classloaders. TestClass loaded by FlinkUserCodeClassLoader,
but TextFormat class loaded by sun.misc.Launcher$AppClassLoader

This message was sent by Atlassian JIRA

View raw message