RMLio / RML-Mapper

Generate High Quality Linked Data from multiple originally (semi-)structured data (legacy)
http://RML.io
52 stars 20 forks source link

Resources missing from fno branch (metadata.json) #19

Closed jimkont closed 7 years ago

jimkont commented 7 years ago

Some resources are missing from the fno branch and silently fail the generation of triples. E.g. the missing metadata.json file returns a null pointer exception and fails to return a proper processor. These files need to be included as resources

java.io.FileNotFoundException: /home/dimitris/.m2/repository/be/ugent/mmlab/rml/RML-Processor/0.4/resources/functions/metadata.json (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at java.io.FileReader.<init>(FileReader.java:58)
    at be.ugent.mmlab.rml.function.FunctionHandler.loadFromDisk(FunctionHandler.java:54)
    at be.ugent.mmlab.rml.function.FunctionHandler.<init>(FunctionHandler.java:47)
    at be.ugent.mmlab.rml.function.ConcreteFunctionProcessor.getInstance(ConcreteFunctionProcessor.java:40)
    at be.ugent.mmlab.rml.logicalsourcehandler.termmap.AbstractTermMapProcessor.<init>(AbstractTermMapProcessor.java:38)
    at be.ugent.mmlab.rml.logicalsourcehandler.termmap.concrete.JSONPathTermMapProcessor.<init>(JSONPathTermMapProcessor.java:17)
    at be.ugent.mmlab.rml.processor.concrete.ConcreteTermMapFactory.create(ConcreteTermMapFactory.java:70)
    at be.ugent.mmlab.rml.processor.concrete.JSONPathProcessor.<init>(JSONPathProcessor.java:33)
    at be.ugent.mmlab.rml.processor.concrete.ConcreteRMLProcessorFactory.create(ConcreteRMLProcessorFactory.java:47)
    at be.ugent.mmlab.rml.core.StdRMLEngine.generateRMLProcessor(StdRMLEngine.java:205)
    at be.ugent.mmlab.rml.core.StdRMLEngine.startTriplesMapExecution(StdRMLEngine.java:229)
    at be.ugent.mmlab.rml.core.StdRMLEngine.generateTriplesMapTriples(StdRMLEngine.java:186)
    at be.ugent.mmlab.rml.core.StdRMLEngine.generateRDFTriples(StdRMLEngine.java:159)
    at be.ugent.mmlab.rml.core.StdRMLEngine.runRMLMapping(StdRMLEngine.java:105)
bjdmeest commented 7 years ago

there was a problem when using the project as maven dependency. metadata.json shouldn't be packaged, but its location used to be derived from the location of the RML-Processor package (which is a problem when including the RML-Processor as maven dependency). I changed this to rather derive the location of metadata.json based on the current working directory.

To make sure you can use the data transformations inside RML documents, you should copy the current 'resources' folder in the root of this repo to the working directory. I also added this to the readme.

Adding additional data transformation implementations currently involves adding the implementation as .jar or .java files inside resources/functions, and adding their metadata to metadata.json.

jimkont commented 7 years ago

Thank you Ben, quite fast! I tried it without copying the resources and it still works fine. I use simple RML mappings for now so I guess this is the reason. I'll ping again if there is any issue with more advanced mappings