Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F9E018717 for ; Mon, 21 Dec 2015 15:42:13 +0000 (UTC) Received: (qmail 17298 invoked by uid 500); 21 Dec 2015 15:42:13 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 17224 invoked by uid 500); 21 Dec 2015 15:42:13 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 17212 invoked by uid 99); 21 Dec 2015 15:42:12 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Dec 2015 15:42:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 87B41C06CE for ; Mon, 21 Dec 2015 15:42:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.314 X-Spam-Level: ** X-Spam-Status: No, score=2.314 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id OO9yDvU6a7kH for ; Mon, 21 Dec 2015 15:42:01 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 5BDBE20BFB for ; Mon, 21 Dec 2015 15:42:00 +0000 (UTC) Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id 943B166BA093 for ; Mon, 21 Dec 2015 07:40:20 -0800 (PST) Date: Mon, 21 Dec 2015 08:41:59 -0700 (MST) From: peterpanne To: dev@flink.apache.org Message-ID: <1450712519650-9653.post@n3.nabble.com> In-Reply-To: <1450455314176-9649.post@n3.nabble.com> References: <1433273911879-5997.post@n3.nabble.com> <1433366702380-6087.post@n3.nabble.com> <1433429559462-6143.post@n3.nabble.com> <1441539650779-7870.post@n3.nabble.com> <1450455314176-9649.post@n3.nabble.com> Subject: Re: ClassNotFoundException : org.apache.flink.api.common.operators.util.UserCodeObjectWrapper, while trying to run locally MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I identified the root-cause of the problem: When the FlinkUserCodeClassLoader ist created it simply instantiates the URLClassLoader which takes the System-Classloader as parent. However in the web-application-setting the current thread-webapp-classloader should be taken. I tried to change the class slightly to take the "right" threads class loader as parent. private static class FlinkUserCodeClassLoader extends URLClassLoader { public FlinkUserCodeClassLoader(URL[] urls) { super(urls, Thread.currentThread().getContextClassLoader());}} Unfortunately there are multiple places where the system-classloader ist taken instead of the thread class loader: flink-runtime/src/main/java/org/apache/flink/runtime/accumulators/AccumulatorSnapshot.java That solved my problem for the moment. However, I am not sure if that introduces problems somewhere else. In theory it should not be critical since the web-appclassloader simply introduces an additional level of classes to look for. It would cool if that problem could be resolved in flink ;-) -- View this message in context: http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/ClassNotFoundException-org-apache-flink-api-common-operators-util-UserCodeObjectWrapper-while-tryingy-tp5922p9653.html Sent from the Apache Flink Mailing List archive. mailing list archive at Nabble.com.