jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Retrieve matching text
Date Fri, 21 Apr 2006 08:39:57 GMT
Can you please check your repository.xml and workspace.xml files for a 
parameter like the following in SearchIndex:

<param name="queryClass" 
value="org.apache.jackrabbit.core.query.QueryImpl"/>

and make sure the value does contain whitespace characters?

I've been able to get a very similar exception when I added a whitespace 
to the end of the value.

btw. since the above parameter is equal to the default value you can 
also remove the parameter from the configuration.

regards
  marcel

Bilikiss O Adebiyi wrote:
> Hi 
> Thank s for replying so quickly. 
> Here is the code I wrote, I'm making a simple blog entry and doing a query 
> using xpath for the property I added. (This does not query against my 
> nt:resource nodes by the way, I know the indexer only indexes nt:resource 
> nodes with binary content)
> 
> Node root = dataStore.getRoot();
>                 Node blog = root.addNode("blog");
>                 blog.setProperty("blogName", new String("Bilikiss"));
>  
>                 //search
>                 Session s = root.getSession();
>                 s.save();
>  
>                 Workspace ws = s.getWorkspace();
>                 QueryManager qm = ws.getQueryManager();
> 
> //              Specify a query using the XPATH query language
>                 Query q = qm.createQuery("//blog[@blogName = 'Bilikiss']", 
> Query.XPATH);
>                 QueryResult res = q.execute();
> 
> //              Obtain a node iterator 
>                 NodeIterator it = res.getNodes();
> 
>                 while (it.hasNext()) {
> 
>                    Node n = it.nextNode();
>                    Property prop = n.getProperty("blogName");
>                    System.out.println("Found blog entry with title: " 
>                       + prop.getString());
>                 }
> 
> I'm not sure where to get the jar you mentioned. I built jackrabbit using 
> maven and I am using those jars
> 
> Here is the error I get.
> 
> javax.jcr.RepositoryException: Unable to create query: 
> java.lang.ClassNotFoundException: 
> org.apache.jackrabbit.core.query.QueryImpl
>         at 
> org.apache.jackrabbit.core.SearchManager.createQueryInstance(SearchManager.java:511)
>         at 
> org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:336)
>         at 
> org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:87)
>         at 
> com.ibm.smb.docStore.service.test.GeneralDocTest.testSearch(GeneralDocTest.java:47)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
>         at java.lang.reflect.Method.invoke(Method.java:391)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
>         at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> 
> Thanks a lot in advance.
> 
> Bilikiss Adebiyi
> Staff Software Engineer
> SMB 
> Lotus Software, IBM Software Group
> Phone: 1-978-399-5118, (T/L): 333-5118
> 
> 
> 
> Marcel Reutegger <marcel.reutegger@gmx.net> 
> 04/20/2006 04:34 AM
> 
> To
> users@jackrabbit.apache.org
> cc
> Bilikiss O Adebiyi/Westford/IBM@IBMUS
> Subject
> Re: Retrieve matching text
> 
> 
> 
> 
> 
> 
> Can you please post the relevant part of the stacktrace that shows the 
> error or exception? Otherwise it's hard to tell what exactly is wrong.
> 
> also make sure you have all dependent libraries in your classpath, e.g. 
> the ms word filter requires the textmining.jar
> 
> regards
>   marcel
> 
> Bilikiss O Adebiyi wrote:
>> Hello
>> I'm trying to use jackrabbit to perform searches for text. I know I'm 
>> supposed to set my repository.xml using the SearchIndex and set my text 
>> filters so I can filter through binary content.
>> But I'm getting an error stating that QueryImpl cannot be found within 
>> Searchmanager.
>> What configuration did you use for this kind of search? I would like to 
> do 
>> this search on binary content I place in my repository.
>> Thanks a lot in advance
>>
>>
>> Bilikiss Adebiyi
>> Staff Software Engineer
>> SMB 
>> Lotus Software, IBM Software Group
>> Phone: 1-978-399-5118, (T/L): 333-5118
> 
> 

Mime
View raw message