Bug 220072 - malformed nepomuk SQL statement when searching in dolphin
Summary: malformed nepomuk SQL statement when searching in dolphin
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
: 217841 220367 222687 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-25 18:47 UTC by Andreas Kuhl
Modified: 2010-01-27 09:50 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bash output (2.62 KB, text/plain)
2009-12-25 18:48 UTC, Andreas Kuhl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kuhl 2009-12-25 18:47:37 UTC
Version:            (using Devel)
Installed from:    Compiled sources

Nepomuk/Strigi indexed about one gigabyte of data, but searching in dolphin returns nothing. Instead, a malformed SQL statement is dumped to bash (see attachment)

Found in KE 4.3.85.
Comment 1 Andreas Kuhl 2009-12-25 18:48:17 UTC
Created attachment 39336 [details]
bash output
Comment 2 Sebastian Trueg 2009-12-29 09:42:37 UTC
This is not an SQL statement, it is SPARQL. And it is not malformed at all.
To get to the bottom of this issue it would be good to install ksoprano (http://www.kde-apps.org/content/show.php/ksoprano?content=116756) and then run the query in there (the part after "nepomuksearch:/?sparql=").
Comment 3 Andreas Kuhl 2009-12-29 10:39:03 UTC
I compiled and tested ksoprano with the SPARQL statement in the first attachment. It brought up the error "Query failed:" without any additional information. Starting ksoprano from bash gave a little bit more detail:

---
ksoprano(28941)/nepomuk (library) <unnamed>::GlobalModelContainer::init: Connecting to local socket "/home/ademmer/.kde4/share/apps/nepomuk/socket"
"/usr/bin/ksoprano(28941)" Error in thread 3039254352 : "SQLGetData for data lenght failed (iODBC Error: [iODBC][Driver Manager]Invalid cursor state)"
---

The error seems related to the iODBC driver. Is this information any useful?
Comment 4 Andreas Kuhl 2009-12-29 10:40:37 UTC
Query was:

select distinct ?r  where { { ?r ?v1 ?v2 . ?v2 bif:contains "'aoe*'" . { ?r a ?v3 . ?v3 <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> . } UNION { ?r a ?v4 . ?v4 <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder> . } . } .    }
Comment 5 Sebastian Trueg 2009-12-29 11:35:59 UTC
which version of virtuoso are you running?
Comment 6 Andreas Kuhl 2009-12-29 15:10:23 UTC
Virtuoso 5.0.12 although the soprano-backend-virtuoso has a different version:

http://pastebin.ca/1730658
Comment 7 Andreas Kuhl 2010-01-08 15:30:00 UTC
Still fails with KDE SC 4.3.90 although searching with KRunner works now. Something seems seriously broken or is this only happening on my system? Any issues with the software versions I posted above?
Comment 8 Andreas Kuhl 2010-01-11 16:38:36 UTC
Any news on this? :-)
Comment 9 Sebastian Trueg 2010-01-14 11:40:05 UTC
*** Bug 220367 has been marked as a duplicate of this bug. ***
Comment 10 thomas gahr 2010-01-15 15:25:04 UTC
sebastian, maybe this might be of interest for you:
i just installed the kdeplayground/nepomuk-stuff and search works fine with the simple knepomuk search client
otherwise i'm having the same issues - search works in krunner (partially) but not in dolphin
Comment 11 Sebastian Trueg 2010-01-15 15:41:22 UTC
That is not related.
And what does "partially" mean?
Comment 12 Andreas Kuhl 2010-01-15 15:50:17 UTC
Maybe it means that the results shown in krunner seem to be too few. I have this feeling to, but the krunner interface is very limited for showing nepomuk results. Therefore, I wanted to verify this in a working dolphin (or other GUIs) before opening a new bug report.

BTW: Not a single email is shown in the search results, is this behaviour intended?

Thanks for taking the time and looking into this bug report. I appreciate this very much! :-)
Comment 13 thomas gahr 2010-01-15 16:21:32 UTC
oh. too bad.
sorry for being unprecise in #10
partially means that:
a) krunner crashes (that would be another bug and it's not reproducible)
b) it freezes (also not reproducible)
c) it works

i'm currently trying to run krunner from the console and gather ouput of cases a) and b)...

i would really like to help you nail this down and is suppose it would be best to check against the 4.4 branch - what parts of kde would i have to recompile? kdebase only?
Comment 14 Andreas Kuhl 2010-01-17 19:09:25 UTC
I stumbled upon a thread in the KDE forums, where others have the problem described here, too: http://forum.kde.org/viewtopic.php?f=66&t=84870
Comment 15 Sebastian Trueg 2010-01-26 11:20:27 UTC
Which version of redland/librdf is installed?
Comment 16 Andreas Kuhl 2010-01-26 11:27:55 UTC
Here is a listing of my installed versions of soprano-backend-redland and libredland: http://pastebin.ca/1766340
Comment 17 Sebastian Trueg 2010-01-26 11:31:28 UTC
Ok, the versions look good.
What do you get if you issue the failed query on the command line:

sopranocmd --model main --dbus org.kde.NepomukStorage query 'select distinct ?r  where { { ?r ?v1 ?v2 . ?v2 bif:contains "\'aoe*\'" . { ?r a
?v3 . ?v3 <http://www.w3.org/2000/01/rdf-schema#subClassOf>
<http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> . }
UNION { ?r a ?v4 . ?v4 <http://www.w3.org/2000/01/rdf-schema#subClassOf>
<http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder> . } . } .   
}'
Comment 18 Andreas Kuhl 2010-01-26 11:47:47 UTC
---
Total results: 0
Execution time: 00:00:00.11
---

But this is literally impossible! Searching for "aoe" in krunner brings up some results. Running the same query with ksoprano fails again: "SQLGetData for data lenght failed (iODBC Error: [iODBC][Driver Manager]Invalid cursor state)".


What is going wrong here?
Comment 19 Sebastian Trueg 2010-01-26 14:43:08 UTC
*** Bug 222687 has been marked as a duplicate of this bug. ***
Comment 20 Sebastian Trueg 2010-01-26 14:44:18 UTC
SVN commit 1080576 by trueg:

Properly register a new resource type with KStandardDirs instead of trying to hack our way into
the paths.
This fixes ontology localization on several distributions.

BUG: 220072


 M  +8 -5      ontologyloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1080576
Comment 21 Andreas Kuhl 2010-01-26 14:51:48 UTC
Patch tested on KDE 4.3.95, I can confirm this bug as fixed! Thanks a lot to Sebastian for his endurance to dig with me into this issue. :-)
Comment 22 Sebastian Trueg 2010-01-27 09:50:52 UTC
*** Bug 217841 has been marked as a duplicate of this bug. ***