New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple sources found exception #25

Closed
amgadmadkour opened this Issue Jan 14, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@amgadmadkour
Copy link

amgadmadkour commented Jan 14, 2018

I get the following exception: Exception in thread "main" org.apache.spark.sql.AnalysisException: Multiple sources found for ntriples (net.sansa_stack.rdf.spark.io.ntriples.NTriplesDataSource, net.sansa_stack.inference.spark.data.loader.sql.NTriplesDataSource), please specify the fully qualified class name

The exception is thrown whenever a project includes both the SANSA-core and the SANSA-inference package. To recreate the exception, (e.g. using the Sansa stack template) run the following two lines:

val lang: Lang = Lang.NTRIPLES
var df = spark.read.rdf(lang)(INPUTFILE)

The redundant datasource is NTriplesDataSource as stated in the error. Im assuming the same error will also be raised for the turtle format. The error is caused due to the same datasource shortname (e.g. ntriples) being used with the same class name in two different packages. My work-around was to call only one JAR in the project (e.g. SANSA-core).

@GezimSejdiu

This comment has been minimized.

Copy link
Member

GezimSejdiu commented Jan 15, 2018

Hi @amgadmadkour ,
many thanks for your valuable feedback on this issue. Yes, you are right, I just tested it out and got the same error. This is due multiple sources defined on both layers (RDF layer and Inference layer ), we are working towards aligning SANSA-Inference reader into SANSA-RDF. It will happen soon:). Will update when it is done.

Best regards,
Gezim

@LorenzBuehmann

This comment has been minimized.

Copy link
Member

LorenzBuehmann commented Jan 26, 2018

Should have been solved with commit SANSA-Stack/SANSA-Inference@79d2b58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment