fpriyatna / morph

This project has been moved to: https://github.com/oeg-upm/morph-rdb. R2RML Engine that follows the specification of http://www.w3.org/2001/sw/rdb2rdf/r2rml/
http://mayor2.dia.fi.upm.es/oeg-upm/index.php/es/technologies/315-morph-rdb
Other
4 stars 1 forks source link

Wrong Writer import in MorphQueryRewriter #2

Open frmichel opened 8 years ago

frmichel commented 8 years ago

Hi guys, I've noticed an issue that might be a bug.

The MorphQueryRewritterFactory creates a MorphQueryRewriter instance and casts it as com.hp.hpl.jena.sparql.algebra.optimize.Rewrite. But MorphQueryRewriter extends another Rewrite: com.hp.hpl.jena.graph.query.Rewrite.

When evaluating a SPARQL query on the model from the MorphBaseMaterializer, I get a cast exception: java.lang.ClassCastException: es.upm.fi.dia.oeg.morph.base.querytranslator.engine.MorphQueryRewriter cannot be cast to com.hp.hpl.jena.sparql.algebra.optimize.Rewrite

Fix: MorphQueryRewriter should extend com.hp.hpl.jena.sparql.algebra.optimize.Rewrite.

What I'm surprised about is that you didn't get into this error earlier. Is there a good reason for that or is it because you do not use the MorphQueryRewriter?

Thx, Franck.

fpriyatna commented 8 years ago

hi Franck, thanks for informing this.

No, I didn't get this error message earlier. Yes, I can see that they have the same class name but different package name. I'll fix this.

Regards Freddy

2016-02-05 10:53 GMT-05:00 Franck Michel notifications@github.com:

Hi guys, I've noticed an issue that might be a bug.

The MorphQueryRewritterFactory creates a MorphQueryRewriter instance and casts it as com.hp.hpl.jena.sparql.algebra.optimize.Rewrite. But MorphQueryRewriter extends another Rewrite: com.hp.hpl.jena.graph.query.Rewrite.

When evaluating a SPARQL query on the model from the MorphBaseMaterializer, I get a cast exception: java.lang.ClassCastException: es.upm.fi.dia.oeg.morph.base.querytranslator.engine.MorphQueryRewriter cannot be cast to com.hp.hpl.jena.sparql.algebra.optimize.Rewrite

Fix: MorphQueryRewriter should extend com.hp.hpl.jena.sparql.algebra.optimize.Rewrite.

What I'm surprised about is that you didn't get into this error earlier. Is there a good reason for that or is it because you do not use the MorphQueryRewriter?

Thx, Franck.

— Reply to this email directly or view it on GitHub https://github.com/fpriyatna/morph/issues/2.