Hi All,

I've canvased the website in hopes of resolving this recent error I've
been getting when trying to implement XPath and Query support.  The
exception message is "no search manager configured for this
workspace."  I've looked over the IBM Developer's Works article on
configuring and developing with Jackrabbit and even after implementing
said configuration I'm still getting this exception.

I've attached the Java code and Configuration file in the hopes of
providing some light on the situation.  I'm sure the problem is
something simple but at this time I've been unable to find the answer,
any guidance would be greatly appreciated!

Thanks,

Java code:
String configFile =
getServletContext().getRealPath("/WEB-INF/repositories.xml");
String repHomeDir = "C:/temp/repository";
                        
RepositoryConfig config = RepositoryConfig.create(configFile, repHomeDir);
JackrabbitRepository repository = RepositoryImpl.create(config);
SimpleCredentials cred = new SimpleCredentials("userid", "".toCharArray());
Session session = repository.login(cred, null);
Workspace ws = session.getWorkspace();
QueryManager qm = ws.getQueryManager();
Query q = qm.createQuery("//[EMAIL PROTECTED]:uuid = " + id +"]", Query.XPATH);
QueryResult result = q.execute();
NodeIterator it = result.getNodes();

This is the configuration file I use :
<?xml version="1.0" encoding="ISO-8859-1"?>
<Repository>
    <FileSystem
                 class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/repository"/>
    </FileSystem>
    <Security appName="Jackrabbit">
        <AccessManager
                         
class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
                        <param name="userid" value="" />
                </LoginModule>
    </Security>
    <Workspaces
                 rootPath="${rep.home}/workspaces"
                                 defaultWorkspace="default" />
    <Workspace name="${wsp.name}">
        <FileSystem
                         
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <SearchManager
                
class="org.apache.jackrabbit.core.query.xpath.XPathQueryBuilder" />
        <PersistenceManager
            class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"
/>
        <SearchIndex
                class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index" />
        </SearchIndex>
    </Workspace>
    <Versioning rootPath="${rep.home}/versions">
        <FileSystem
                         
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${rep.home}/versions"/>
        </FileSystem>
        <PersistenceManager
            class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"
/>
    </Versioning>
</Repository>

Reply via email to