jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Indexing custom nodetype's properties
Date Tue, 06 Jan 2009 17:27:07 GMT
The page http://wiki.apache.org/jackrabbit/IndexingConfiguration
mentions that you have to put those namespaces into the configuration
element of the xml file:

"Please note that you have to declare the namespace prefixes in the
configuration element that you are using throughout the XML file!"

See also http://markmail.org/message/g4ylatn4rhii4l7s for an example.

Regards,
Alex

On Tue, Jan 6, 2009 at 5:39 PM, Gustavo Guevara <g.guevara@i-deal.hu> wrote:
> Hello,
>
> I've defined a custom nodetype with some properties, and now I am
> implementing Full Text Search. I would like this search to be done on
> several of the properties of my Custom Node, right now it is only working
> for jcr:data which is inherited from nt:resource.
>
> In order to achieve this I have created an indexing_configuration.xml file
> as advised on the website, adding rules for each of the properties I want to
> index, like so:
>
> /<?xml version="1.0"?>
> <!DOCTYPE configuration SYSTEM
> "http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
> <!--
> <index-rule nodeType="toolTest:contractTest">
>  <property>state_of_contract</property>
>  <property>author</property>
> ...
>  </index-rule>
> </configuration>
>
> /When I run my application I get the following exception when trying to
> login to my repository:
>
> /17625 [http-8080-2] WARN
> org.apache.jackrabbit.core.query.lucene.SearchIndex - Exception initializing
> indexing configuration from:
> C:/.../web/WEB-INF/spring/indexing_configuration.xml
> *javax.jcr.NamespaceException: Unknown namespace prefix toolTest.*
>  at
> org.apache.jackrabbit.core.nodetype.xml.AdditionalNamespaceResolver.getURI(AdditionalNamespaceResolver.java:86)
>  at
> org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:116)
>  at
> org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:62)
>  at
> org.apache.jackrabbit.core.query.lucene.IndexingConfigurationImpl$IndexingRule.getNodeTypeName(IndexingConfigurationImpl.java:640)
>  at
> org.apache.jackrabbit.core.query.lucene.IndexingConfigurationImpl$IndexingRule.<init>(IndexingConfigurationImpl.java:537)
>  at
> org.apache.jackrabbit.core.query.lucene.IndexingConfigurationImpl.init(IndexingConfigurationImpl.java:125)
>  at
> org.apache.jackrabbit.core.query.lucene.SearchIndex.createIndexingConfiguration(SearchIndex.java:935)
>  at
> org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:445)
>  at
> org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:53)
>  at
> org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:583)
>  at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:265)
>  at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
>  at
> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
>  at
> org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:186)
>  at
> org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
>  at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
>  at
> org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
>  at
> com.ideal.electool.contracttool.jackrabbit.RepositoryLogin.startRepository(RepositoryLogin.java:88)
>  at
> com.ideal.electool.contracttool.jackrabbit.RepositoryStorage.storage(RepositoryStorage.java:63)
>  at
> com.electool.bidding.controller.pageflow.organizerPages.contractEdit.ManageContractPage.doProcessUnprotectedAction(ManageContractPage.java:116)
>  at
> com.electool.framework.controller.base.commands.AbstractProtectingPostGetCommand.processData(AbstractProtectingPostGetCommand.java:167)
>  at
> com.electool.framework.controller.base.PostGetCommandControllerBase.handleRequestInternal(PostGetCommandControllerBase.java:89)
>  at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>  at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
>  at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
>  at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
>  at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
>  at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>  at java.lang.Thread.run(Unknown Source)
> *17640 [http-8080-2] WARN
> org.apache.jackrabbit.core.query.lucene.SearchIndex -
> C:/.../web/WEB-INF/spring/indexing_configuration.xml ignored.
>
> */The namespace I am using is registered after logging into the repository
> for the first time, thus upon attempting to use the namespace in the
> indexing configuration file it will always give me this error.
>
> What is the correct way to index these properties?
>
> Thank you!
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message