Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B14AD18506 for ; Wed, 7 Oct 2015 17:24:00 +0000 (UTC) Received: (qmail 31167 invoked by uid 500); 7 Oct 2015 17:23:55 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 31082 invoked by uid 500); 7 Oct 2015 17:23:55 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 31071 invoked by uid 99); 7 Oct 2015 17:23:55 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2015 17:23:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4D2591A2345 for ; Wed, 7 Oct 2015 17:23:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id BESu9TjdNGw5 for ; Wed, 7 Oct 2015 17:23:49 +0000 (UTC) Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com [209.85.220.172]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 2A43542F38 for ; Wed, 7 Oct 2015 17:23:49 +0000 (UTC) Received: by qkbi190 with SMTP id i190so8609255qkb.1 for ; Wed, 07 Oct 2015 10:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NSnMilpJo3wa/TzWAuFNorbKM8PTPyYQvx84XuP7jew=; b=gnIQ4jre8a1sGZ2ck1sEsgIscpo76cZ67/Ndq6vTzFjHJcJwSVVWOCGAbSxnibjxPz RLewt6Mctcq3Crxnl96TOUqNQFlAlDmQSA5Nv6GS45qfJ4UTLeU2LgOiwNumc0fBJ4N+ 7LYv324fHKzv62Ivj8MWr1KZRRkA+VLVWBnQtjHiUXnbq7nmKITAyYgeayfnhrsyXd7N l4UmtM9Ok8RDSegbmsW3/AfFGqMXl0aNzNc0YmFepkOt3wpdcay9NQhSZW+J/CNyxktp uYcvosxMerJ64nX757KKiooJbWkCf7yJ6K/aIE7wrYpxZiiAziYa58L0VEmfSfb8yrwo eX0A== MIME-Version: 1.0 X-Received: by 10.55.21.144 with SMTP id 16mr2955574qkv.28.1444238628900; Wed, 07 Oct 2015 10:23:48 -0700 (PDT) Received: by 10.140.40.75 with HTTP; Wed, 7 Oct 2015 10:23:48 -0700 (PDT) In-Reply-To: References: <1444136264370-24951.post@n3.nabble.com> Date: Wed, 7 Oct 2015 14:23:48 -0300 Message-ID: Subject: Re: compatibility issue with Jersey2 From: Gary Ogden To: Marcelo Vanzin Cc: "user@spark.apache.org" Content-Type: multipart/alternative; boundary=001a1147b2b07257a1052187023e --001a1147b2b07257a1052187023e Content-Type: text/plain; charset=UTF-8 What you suggested seems to have worked for unit tests. But now it throws this at run time on mesos with spark-submit: Exception in thread "main" java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/apache/spark/util/ChildFirstURLClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:336) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:284) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:305) at com.company.spark.utils.SparkJob.(SparkJob.java:41) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:634) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:170) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:193) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:112) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) On 6 October 2015 at 16:20, Marcelo Vanzin wrote: > On Tue, Oct 6, 2015 at 12:04 PM, Gary Ogden wrote: > > But we run unit tests differently in our build environment, which is > > throwing the error. It's setup like this: > > > > I suspect this is what you were referring to when you said I have a > problem? > > Yes, that is what I was referring to. But, in your test environment, > you might be able to work around the problem by setting > "spark.ui.enabled=false"; that should disable all the code that uses > Jersey, so you can use your newer version in your unit tests. > > > -- > Marcelo > --001a1147b2b07257a1052187023e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
What you suggested seems to have worked for unit tests. Bu= t now it throws this at run time on mesos with spark-submit:

Exception in thread "main" jav=
a.lang.LinkageError: loader constraint violation: when resolving method &qu=
ot;org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFa=
ctory;" the class loader (instance of org/apache/spark/util/ChildFirst=
URLClassLoader) of the current class, org/slf4j/LoggerFactory, and the clas=
s loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class,=
 org/slf4j/impl/StaticLoggerBinder, have different Class objects for the ty=
pe LoggerFactory; used in the signature
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:336)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:284)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:305)
	at com.company.spark.utils.SparkJob.<clinit>(SparkJob.java:41)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmi=
t$$runMain(SparkSubmit.scala:634)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:170)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:193)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:112)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
=

On 6 Octobe= r 2015 at 16:20, Marcelo Vanzin <vanzin@cloudera.com> wrot= e:
On Tue, Oct 6, 2015 a= t 12:04 PM, Gary Ogden <gogden@gmail= .com> wrote:
> But we run unit tests differently in our build environment, which is > throwing the error. It's setup like this:
>
> I suspect this is what you were referring to w= hen you said I have a problem?

Yes, that is what I was referring to. But, in your test environment,=
you might be able to work around the problem by setting
"spark.ui.enabled=3Dfalse"; that should disable all the code that= uses
Jersey, so you can use your newer version in your unit tests.


--
Marcelo

--001a1147b2b07257a1052187023e--