An error occurred during reasoning: Fresh entity policy: ALLOW Individual node set policy: BY_NAME timeout: 9223372036854775807.

285 views
Skip to first unread message

Sebastian

unread,
Aug 26, 2023, 11:46:05 AM8/26/23
to ontop4obda
Hi ontop4obda community

My name is Sebastian and I need your experience and support.

I would lile to extend a Microsoft SQL Server 2017 of an Automation Cell with Ontop for building a VKG.

 

I am using Protege V.5.6.1 wiht the installed Ontop plug in.

 

The database has many different tables. The devices or other objects are related to eahc other via primary and foreign key relations.

 

I have created a first ontology describing the devices:

ontology.png


Out of the first table of the DB called "devices" I was able to create the frist individuals that worked fine.


table1.png


For each type of device I have created an individual mapping e.g.:


mapping result.png


In a second table of the database are some parameters of the machines described such as IP address.

I also would like to connect these paramters as data properties to the classes.


table2.png


My idea was to combine this mapping of the important parameter with the cabove shown creation of eahc instance of a machien. So I wrote a SQL query that transforms and joins the two tables:

SELECT

    D.[DeviceID],

    D.[SystemID],

    D.[DeviceType],

    D.[DeviceNumber],

    D.[DeviceName],

    P.[IPAddress]

FROM (

    SELECT [DeviceID], [SystemID], [DeviceType], [DeviceNumber], [DeviceName]

    FROM [Makino2].[dbo].[Devices]

    WHERE [DeviceType] = '2'

) AS D

JOIN (

    SELECT [DeviceID], [IPAddress]

    FROM (

        SELECT [DeviceID], [ParameterName], [ParameterValue]

        FROM [Makino2].[dbo].[DeviceParameters]

        WHERE [DeviceID] = '1'

    ) AS SourceTable

    PIVOT (

        MAX([ParameterValue]) FOR [ParameterName] IN ([IPAddress])

    ) AS PivotTable

) AS P

ON D.[DeviceID] = P.[DeviceID];


 

The Mapping Editor shows the expected query result:

mapping result 2.png

But after saving ontology and restarting the reasoner the following error is shown:

error.png


The reasoner log file is here:

 

   INFO  17:32:04  ------------------------------- Running Reasoner -------------------------------

   INFO  17:32:11 

  ERROR  17:32:11  An error occurred during reasoning: Fresh entity policy: ALLOW Individual node set policy: BY_NAME timeout: 9223372036854775807.

org.semanticweb.owlapi.reasoner.IllegalConfigurationException: Fresh entity policy: ALLOW Individual node set policy: BY_NAME timeout: 9223372036854775807

at it.unibz.inf.ontop.owlapi.impl.QuestOWL.<init>(QuestOWL.java:115) ~[na:na]

at it.unibz.inf.ontop.owlapi.impl.QuestOWLFactory.createReasoner(QuestOWLFactory.java:81) ~[na:na]

at it.unibz.inf.ontop.owlapi.impl.QuestOWLFactory.createReasoner(QuestOWLFactory.java:94) ~[na:na]

at it.unibz.inf.ontop.protege.core.OntopProtegeReasoner.reasonerSetup(OntopProtegeReasoner.java:65) ~[na:na]

at it.unibz.inf.ontop.protege.core.OntopProtegeReasoner.<init>(OntopProtegeReasoner.java:34) ~[na:na]

at it.unibz.inf.ontop.protege.core.OntopProtegeOWLFactory.createReasoner(OntopProtegeOWLFactory.java:72) ~[na:na]

at it.unibz.inf.ontop.protege.core.OntopProtegeOWLFactory.createReasoner(OntopProtegeOWLFactory.java:25) ~[na:na]

at org.protege.editor.owl.model.inference.ReasonerUtilities.createReasoner(ReasonerUtilities.java:20) ~[na:na]

at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.ensureRunningReasonerInitialized(OWLReasonerManagerImpl.java:428) ~[na:na]

at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:386) ~[na:na]

at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]

Caused by: it.unibz.inf.ontop.exception.UnknownDatatypeException: Could not infer the type of DeviceName2 and the option "ontop.inferDefaultDatatype" is disabled.

 

Mapping assertion:

id: Vehicle Identfication

target atom: triple(s,p,o) with s/RDF(http://www.semanticweb.org/s.spelz/ontologies/2023/7/MiloFMS/MiloFMS/RailMountedVehicle/{}(TmpToNVARCHAR(DeviceID)),IRI), p/<http://www.semanticweb.org/s.spelz/ontologies/2023/7/MiloFMS/systemName>, o/RDF(TmpToNVARCHAR(DeviceName),rdfs:Literal)

source query: SELECT

    D.[DeviceID],

    D.[SystemID],

    D.[DeviceType],

    D.[DeviceNumber],

    D.[DeviceName],

    P.[IPAddress]

FROM (

    SELECT [DeviceID], [SystemID], [DeviceType], [DeviceNumber], [DeviceName]

    FROM [Makino2].[dbo].[Devices]

    WHERE [DeviceType] = '2'

) AS D

JOIN (

    SELECT [DeviceID], [IPAddress]

    FROM (

        SELECT [DeviceID], [ParameterName], [ParameterValue]

        FROM [Makino2].[dbo].[DeviceParameters]

        WHERE [DeviceID] = '1'

    ) AS SourceTable

    PIVOT (

        MAX([ParameterValue]) FOR [ParameterName] IN ([IPAddress])

    ) AS PivotTable

) AS P

ON D.[DeviceID] = P.[DeviceID];

at it.unibz.inf.ontop.spec.mapping.transformer.impl.MappingDatatypeFillerImpl.transform(MappingDatatypeFillerImpl.java:53) ~[na:na]

at it.unibz.inf.ontop.spec.mapping.impl.SQLMappingExtractor.convertPPMapping(SQLMappingExtractor.java:166) ~[na:na]

at it.unibz.inf.ontop.spec.mapping.impl.SQLMappingExtractor.extract(SQLMappingExtractor.java:115) ~[na:na]

at it.unibz.inf.ontop.spec.impl.DefaultOBDASpecificationExtractor.extract(DefaultOBDASpecificationExtractor.java:60) ~[na:na]

at it.unibz.inf.ontop.injection.impl.OntopMappingConfigurationImpl.loadSpecification(OntopMappingConfigurationImpl.java:117) ~[na:na]

at it.unibz.inf.ontop.injection.impl.OntopMappingSQLConfigurationImpl.loadSpecification(OntopMappingSQLConfigurationImpl.java:87) ~[na:na]

at it.unibz.inf.ontop.injection.impl.OntopMappingSQLAllConfigurationImpl.loadSpecification(OntopMappingSQLAllConfigurationImpl.java:47) ~[na:na]

at it.unibz.inf.ontop.injection.impl.OntopSQLOWLAPIConfigurationImpl.loadOBDASpecification(OntopSQLOWLAPIConfigurationImpl.java:34) ~[na:na]

at it.unibz.inf.ontop.injection.impl.OntopOBDAConfigurationImpl.loadSpecification(OntopOBDAConfigurationImpl.java:44) ~[na:na]

at it.unibz.inf.ontop.injection.OntopSystemConfiguration.loadQueryEngine(OntopSystemConfiguration.java:20) ~[na:na]

at it.unibz.inf.ontop.owlapi.impl.QuestOWL.<init>(QuestOWL.java:110) ~[na:na]

... 10 common frames omitted

Caused by: it.unibz.inf.ontop.exception.UnknownDatatypeException: Could not infer the type of DeviceName2 and the option "ontop.inferDefaultDatatype" is disabled.

 

at it.unibz.inf.ontop.spec.mapping.transformer.impl.MappingDatatypeFillerImpl.extractObjectType(MappingDatatypeFillerImpl.java:150) ~[na:na]

at it.unibz.inf.ontop.spec.mapping.transformer.impl.MappingDatatypeFillerImpl.fillMissingDatatype(MappingDatatypeFillerImpl.java:116) ~[na:na]

at it.unibz.inf.ontop.spec.mapping.transformer.impl.MappingDatatypeFillerImpl.transformMappingAssertion(MappingDatatypeFillerImpl.java:83) ~[na:na]

at it.unibz.inf.ontop.spec.mapping.transformer.impl.MappingDatatypeFillerImpl.transform(MappingDatatypeFillerImpl.java:50) ~[na:na]

... 20 common frames omitted


I investigated a lot put I could not find a solution.

I also could not find how to adjust the mentioned option inside of the error log:

"ontop.inferDefaultDatatype"


I highly appreciate your support.


Thanks in advance to the community.


Reply all
Reply to author
Forward
0 new messages