Virtual graph - sms syntax - strange behavior with a "https" prefix

Hi,

I am doing an import from a relational DB, using the Virtual Graph feature. The basics work well, data is imported correctly with a command as:

stardog-admin virtual import -g https://mysite/graph/mygraph/ test myfile.properties myfile_sms.ttl

The content of myfile_sms.ttl is:

@prefix sm: <tag:stardog:api:mapping:> .
@prefix ex: <http://example.com/> .

ex:{“ID”} a ex:GovernmentOrganization ;
ex:id “{“ID”}” ;
sm:map [sm:table “Authority” ; ] .

But now, if I change the prefix “ex” to https:

@prefix ex: <https://example.com/> .

and run the same command to import the data, I do get an error:

eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap

Any idea of what is happening ?
Thank you
Fabian

Hi Fabian,

Can you include the stack trace which should be printed in stardog.log? Thanks.

Jess

Thank you to have a look Jess, here is the stack trace:

ERROR 2017-03-11 09:27:38,461 [StardogServer.WorkerGroup-3] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:createErrorResponse(293): The result encoder received an error message it could not encode, error was:
com.complexible.stardog.plan.eval.operator.OperatorException: An error occurred adding RDF to the index: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:43) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:24) ~[stardog-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
at com.google.common.collect.Iterators.size(Iterators.java:191) ~[guava-18.0.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.UpdateSequenceOperatorImpl.computeNext(UpdateSequenceOperatorImpl.java:85) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.UpdateSequenceOperatorImpl.computeNext(UpdateSequenceOperatorImpl.java:29) ~[stardog-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:115) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
at com.google.common.collect.Iterators.size(Iterators.java:191) ~[guava-18.0.jar:?]
at com.complexible.stardog.plan.eval.QueryEngine.executeUpdate(QueryEngine.java:166) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.query.DefaultQueryFactory$UpdateQueryImpl.execute(DefaultQueryFactory.java:263) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.query.DefaultQueryFactory$UpdateQueryImpl.execute(DefaultQueryFactory.java:242) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.query.DelegatingUpdateQuery.execute(DelegatingUpdateQuery.java:139) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseImpl$TimerPauseUpdate.execute(DatabaseImpl.java:1571) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseImpl$TimerPauseUpdate.execute(DatabaseImpl.java:1559) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.query.DelegatingUpdateQuery.execute(DelegatingUpdateQuery.java:139) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.StardogKernel$SecuredUpdateQuery.execute(StardogKernel.java:3765) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.StardogKernel$SecuredUpdateQuery.execute(StardogKernel.java:3752) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.protocols.server.SPECServerFunction.query(SPECServerFunction.java:526) ~[stardog-protocols-spec-server-4.2.3.jar:?]
at com.complexible.stardog.protocols.server.SPECServerFunction.handleMessage(SPECServerFunction.java:152) ~[stardog-protocols-spec-server-4.2.3.jar:?]
at com.complexible.common.protocols.server.rpc.ServerHandler.lambda$handleMessage$1(ServerHandler.java:311) ~[stardog-protocols-api-server-4.2.3.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_111]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_111]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_111]
Caused by: com.complexible.stardog.db.DatabaseException: An error occurred adding RDF to the index: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.db.DatabaseConnectionImpl.throwDatabaseException(DatabaseConnectionImpl.java:619) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:642) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:40) ~[stardog-4.2.3.jar:?]
… 30 more
Caused by: com.complexible.stardog.StardogException: An error occurred adding RDF to the index: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.add(ConnectableIndexRWConnectionImpl.java:625) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.add(ConnectableIndexRWConnectionImpl.java:397) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:638) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:40) ~[stardog-4.2.3.jar:?]
… 30 more
Caused by: com.complexible.stardog.index.IndexException: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.index.IndexWriterDataMapImpl.update(IndexWriterDataMapImpl.java:118) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.add(IndexWriterDataMapImpl.java:69) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterImpl.add(IndexWriterImpl.java:144) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.impl.DelegatingIndexWriter.add(DelegatingIndexWriter.java:50) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:377) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.add(ConnectableIndexRWConnectionImpl.java:621) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.add(ConnectableIndexRWConnectionImpl.java:397) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:638) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:40) ~[stardog-4.2.3.jar:?]
… 30 more
Caused by: com.complexible.stardog.plan.eval.operator.OperatorException: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.virtual.VirtualGraphIterator.computeNext(VirtualGraphIterator.java:304) ~[stardog-virtual-core-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.ContextOverrideStatementSource$1.hasNext(ContextOverrideStatementSource.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreams$IterationStream.parse(RDFStreams.java:145) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor$ConcurrentLoadManagerImpl.add(RDFStreamProcessor.java:469) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor.add(RDFStreamProcessor.java:198) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.update(IndexWriterDataMapImpl.java:113) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.add(IndexWriterDataMapImpl.java:69) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterImpl.add(IndexWriterImpl.java:144) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.impl.DelegatingIndexWriter.add(DelegatingIndexWriter.java:50) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:377) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.add(ConnectableIndexRWConnectionImpl.java:621) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.add(ConnectableIndexRWConnectionImpl.java:397) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:638) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:40) ~[stardog-4.2.3.jar:?]
… 30 more
Caused by: java.lang.ClassCastException: eu.optique.api.mapping.impl.PredicateMapImpl cannot be cast to eu.optique.api.mapping.ObjectMap
at com.complexible.stardog.virtual.VirtualGraphIterator.createValueGenerator(VirtualGraphIterator.java:211) ~[stardog-virtual-core-4.2.3.jar:?]
at com.complexible.stardog.virtual.VirtualGraphIterator.nextMapping(VirtualGraphIterator.java:144) ~[stardog-virtual-core-4.2.3.jar:?]
at com.complexible.stardog.virtual.VirtualGraphIterator.computeNext(VirtualGraphIterator.java:285) ~[stardog-virtual-core-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.MultiStatementIterator.computeNext(MultiStatementIterator.java:28) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.ContextOverrideStatementSource$1.hasNext(ContextOverrideStatementSource.java:67) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreams$IterationStream.parse(RDFStreams.java:145) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor$ConcurrentLoadManagerImpl.add(RDFStreamProcessor.java:469) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor.add(RDFStreamProcessor.java:198) ~[stardog-utils-rdf-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.update(IndexWriterDataMapImpl.java:113) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterDataMapImpl.add(IndexWriterDataMapImpl.java:69) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.IndexWriterImpl.add(IndexWriterImpl.java:144) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.impl.DelegatingIndexWriter.add(DelegatingIndexWriter.java:50) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:377) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.add(ConnectableIndexRWConnectionImpl.java:621) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.add(ConnectableIndexRWConnectionImpl.java:397) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:638) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AddOperatorImpl.computeNext(AddOperatorImpl.java:40) ~[stardog-4.2.3.jar:?]
… 30 more

Thanks for the stack trace. I have verified this bug and created ticket #3603 to track it.

Jess

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.