{"action":"created","issue":{"url":"https://api.github.com/repos/ontop/ontop/issues/146","repository_url":"https://api.github.com/repos/ontop/ontop","labels_url":"https://api.github.com/repos/ontop/ontop/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/ontop/ontop/issues/146/comments","events_url":"https://api.github.com/repos/ontop/ontop/issues/146/events","html_url":"https://github.com/ontop/ontop/issues/146","id":163541106,"number":146,"title":"Capital letters in primary keys (PostgreSQL) caused NullPointerException during reasoner initialization","user":{"login":"AllenatChina","id":9080785,"avatar_url":"https://avatars.githubusercontent.com/u/9080785?v=3","gravatar_id":"","url":"https://api.github.com/users/AllenatChina","html_url":"https://github.com/AllenatChina","followers_url":"https://api.github.com/users/AllenatChina/followers","following_url":"https://api.github.com/users/AllenatChina/following{/other_user}","gists_url":"https://api.github.com/users/AllenatChina/gists{/gist_id}","starred_url":"https://api.github.com/users/AllenatChina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllenatChina/subscriptions","organizations_url":"https://api.github.com/users/AllenatChina/orgs","repos_url":"https://api.github.com/users/AllenatChina/repos","events_url":"https://api.github.com/users/AllenatChina/events{/privacy}","received_events_url":"https://api.github.com/users/AllenatChina/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-03T00:24:20Z","updated_at":"2016-07-11T16:46:24Z","closed_at":null,"body":"Hello,\r\n\r\nI am using Ontop in my project. I met some NullPointerExceptions when starting the reasoner in Protege. Through java api debugging, I found out that when my primary key was uppercase, it failed to setup repository of the Quest instance. I checked some source files like\r\nQuotedIDFactoryLowerCase.java\r\nQuotedID.java\r\nI think something might be wrong with the quotation parsing, because from debugging I found two versions \"ID\" and \"\"ID\"\"  (the name of my primary key is ID) in two QuotedID instances which needs to be matched.\r\n\r\nRefer to those lines of code:\r\nit.unibz.inf.ontop.sql.DBMetadataExtractor.java : 257\r\nit.unibz.inf.ontop.sql.DBMetadataExtractor.java : 593\r\nit.unibz.inf.ontop.sql.DBMetadataExtractor.java : 601\r\nit.unibz.inf.ontop.sql.DatabaseRelationDefinition.java : 85      //returns null\r\n\r\nBelow are the logs:\r\n\r\n2016-07-03 01:25:00.324 [Classification Thread] ERROR OWLReasonerManager    An error occurred during reasoning: it.unibz.inf.ontop.model.OBDAException: java.lang.NullPointerException.\r\norg.semanticweb.owlapi.reasoner.ReasonerInternalException: it.unibz.inf.ontop.model.OBDAException: java.lang.NullPointerException\r\n\tat it.unibz.inf.ontop.owlrefplatform.owlapi.QuestOWL.prepareReasoner(QuestOWL.java:465) ~[na:na]\r\n\tat it.unibz.inf.ontop.owlrefplatform.owlapi.QuestOWL.flush(QuestOWL.java:206) ~[na:na]\r\n\tat org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.ensureRunningReasonerInitialized(OWLReasonerManagerImpl.java:423) ~[na:na]\r\n\tat org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:382) ~[na:na]\r\n\tat java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_40]\r\nCaused by: it.unibz.inf.ontop.model.OBDAException: java.lang.NullPointerException\r\n\tat it.unibz.inf.ontop.owlrefplatform.core.Quest.setupRepository(Quest.java:661) ~[na:na]\r\n\tat it.unibz.inf.ontop.owlrefplatform.owlapi.QuestOWL.prepareQuestInstance(QuestOWL.java:271) ~[na:na]\r\n\tat it.unibz.inf.ontop.owlrefplatform.owlapi.QuestOWL.prepareReasoner(QuestOWL.java:452) ~[na:na]\r\n\t... 4 common frames omitted\r\nCaused by: java.lang.NullPointerException: null\r\n\tat it.unibz.inf.ontop.sql.UniqueConstraint$Builder.add(UniqueConstraint.java:65) ~[na:na]\r\n\tat it.unibz.inf.ontop.sql.DBMetadataExtractor.getUniqueAttributes(DBMetadataExtractor.java:601) ~[na:na]\r\n\tat it.unibz.inf.ontop.sql.DBMetadataExtractor.loadMetadata(DBMetadataExtractor.java:257) ~[na:na]\r\n\tat it.unibz.inf.ontop.owlrefplatform.core.Quest.setupRepository(Quest.java:556) ~[na:na]\r\n\t... 6 common frames omitted"},"comment":{"url":"https://api.github.com/repos/ontop/ontop/issues/comments/231792840","html_url":"https://github.com/ontop/ontop/issues/146#issuecomment-231792840","issue_url":"https://api.github.com/repos/ontop/ontop/issues/146","id":231792840,"user":{"login":"AllenatChina","id":9080785,"avatar_url":"https://avatars.githubusercontent.com/u/9080785?v=3","gravatar_id":"","url":"https://api.github.com/users/AllenatChina","html_url":"https://github.com/AllenatChina","followers_url":"https://api.github.com/users/AllenatChina/followers","following_url":"https://api.github.com/users/AllenatChina/following{/other_user}","gists_url":"https://api.github.com/users/AllenatChina/gists{/gist_id}","starred_url":"https://api.github.com/users/AllenatChina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllenatChina/subscriptions","organizations_url":"https://api.github.com/users/AllenatChina/orgs","repos_url":"https://api.github.com/users/AllenatChina/repos","events_url":"https://api.github.com/users/AllenatChina/events{/privacy}","received_events_url":"https://api.github.com/users/AllenatChina/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T16:46:24Z","updated_at":"2016-07-11T16:46:24Z","body":"@ghxiao I tested again with the latest jdbc driver. It works this time! The thing is even I changed the location of driver in the Preference panel, I have to restart Protégé to make it load the new driver.\r\n\r\nThank you for your patience 👍 ! But you should update your wiki more often!  Since here https://github.com/ontop/ontop/wiki/ObdalibPluginJDBC version 9.1-902 is still recommended for PostgreSQL! : )"}}
{"actor":{"display_login":"AllenatChina"}}