Hi all, I filed https://issues.apache.org/jira/browse/SPARK-11081. Since Jersey’s surface area is relatively small and seems to be only used for Spark UI and json API, shading the dependency might make sense similar to what’s done for Jerry dependencies at https://issues.apache.org/jira/browse/SPARK-3996. Would this be reasonable?
Mingyu On 10/7/15, 11:26 AM, "Marcelo Vanzin" <[email protected]> wrote: >Seems like you might be running into >https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_SPARK-2D10910&d=CQIBaQ&c=izlc9mHr637UR4lpLEZLFFS3Vn2UXBrZ4tFb6oOnmz8&r=ennQJq47pNnObsDh-88a9YUrUulcYQoV8giPASqXB84&m=GuNlWwLNE7UP5euS6Ccu86dUSs1AuiouVOM3bTeZuoQ&s=Z23j4oFFQ12DNJYiFfXFsXPlpav2HD0W0eZqVEhjjOk&e= > . I've been busy with >other things but plan to take a look at that one when I find time... >right now I don't really have a solution, other than making sure your >application's jars do not include those classes the exception is >complaining about. > >On Wed, Oct 7, 2015 at 10:23 AM, Gary Ogden <[email protected]> wrote: >> 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.<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$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 <[email protected]> wrote: >>> >>> On Tue, Oct 6, 2015 at 12:04 PM, Gary Ogden <[email protected]> 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 >> >> > > > >-- >Marcelo > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] >
smime.p7s
Description: S/MIME cryptographic signature
