Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: dieter Newsgroups: comp.lang.python Subject: Re: JAR files into python Date: Sat, 02 Jul 2016 09:37:07 +0200 Lines: 13 Message-ID: References: <877fd4ij8c.fsf@handshake.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-berlin.de FjZrW2B0gTtcp0E8tMLs/wEXbxS+gkNjxhfJeUwfkpwQ== Cancel-Lock: sha1:v8EYGKRlHCoJCcYzrmpBYNsm1qU= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'subject:into': 0.09; 'throws': 0.09; 'python': 0.10; 'subject:python': 0.14; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'runtime.': 0.16; 'skip:j 30': 0.16; 'load': 0.20; 'java': 0.22; 'logical': 0.22; 'header:User-Agent:1': 0.26; '(which': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'consult': 0.27; 'occurred': 0.29; 'there': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'expect': 0.37; 'received:org': 0.37; 'skip:s 50': 0.37; 'charset:us-ascii': 0.37; 'skip:p 20': 0.38; 'files': 0.38; 'data': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'bridge': 0.63; 'activated': 0.84; 'source:': 0.84; 'thing).': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: p57b39d7e.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <877fd4ij8c.fsf@handshake.de> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:110949 Joaquin Alzola writes: > ... > The error that it throws is the following one (which is logical because I do not load the jar files): > py4j.protocol.Py4JJavaError: An error occurred while calling o29.load. > : java.lang.ClassNotFoundException: Failed to find data source: org.apache.spark.sql.cassandra. Please find packages at http://spark-packages.org > > Is there a way to load those jar files into python or the classpath when calling sqlContext.read.format("org.apache.spark.sql.cassandra")? Apparently, you are using a Python-Java bridge (looks like "pyspark" is such a thing). I expect that such a bridge provides ways to make JAR files known to the activated Java runtime. Consult its documentation.