cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian <cerebr...@yahoo.com>
Subject Re: xmldb:xindice pseudo protocol in cocoon2.1
Date Wed, 17 Sep 2003 13:36:22 GMT
Yury,

I use xindice by calling the xml:db java api with the
xindice-embed protocol.  In essence this eliminated
the need to have "localhost:8080" in your sitemap
pipeline (also possibly one less port open)...you can
just put xmldb:xindice:///db/web/news-arch/ and be
able to read your resource.  You must configure
cocoon.xconf to use the xindice-embed protocol:
    <!-- xmldb pseudo protocol -->
    <component-instance
class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory"
name="xmldb">
        <!-- Xindice driver -->
        <driver
class="org.apache.xindice.client.xmldb.DatabaseImpl"
type="xindice-embed"/>
    </component-instance>

I would have to add that I have found Xindice to be
unreliable when creating collections.  Generally, they
seem to disappear on server restart.

Hope this helps,
Julian

--- Yury Mikhienko <Yury.Mikhienko@mobicomk.ru> wrote:
> Hi all!
> 
> I mount the xindice1.1b1 as Tomcat webapp on
> localhost host.
> 
> After I trying access to xindice1.1b1 database and
> get the "Could not read resource" error:
> 
> org.apache.cocoon.ProcessingException: Could not
> read resource
> xmldb:xindice://localhost:8080/db/web/news-arch/:
> org.xmldb.api.base.XMLDBException: 
> 
> org.xmldb.api.base.XMLDBException:
> full exception chain stacktrace	
> Original Exception:
> org.xmldb.api.base.XMLDBException:
> at
>
org.xmldb.api.DatabaseManager.getDatabase(DatabaseManager.java:258)
> at
>
org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:190)
> at
>
org.apache.cocoon.components.source.impl.XMLDBSource.collectionToSAX(XMLDBSource.java:257)
> at
>
org.apache.cocoon.components.source.impl.XMLDBSource.toSAX(XMLDBSource.java:196)
> at
>
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:193)
> at
>
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)
> at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
> at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:492)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150)
> 
> The XMLDBSource can not initialize collection, but
> why? I does not have any problem with cocoon2.1m3.
> Furthermore, I dont see the access points in tomcat
> localhost access logs.
> 
> In cocoon core log I see the following:
> 
> DEBUG   (2003-09-15) 19:15.13:215   [core.manager]
> (/info/db-news) Thread-19/SourceResolverImpl:
> Resolving
>
'xmldb:xindice://localhost:8080/db/web/news-arch/#/news'
> with base
>
'file:/usr/local/jakarta/catalina/testapps/cocoon/mobicomk/'
> in context 'file:/usr/local/jakarta/catalina/bin/'
> DEBUG   (2003-09-15) 19:15.13:216   [core.manager]
> (/info/db-news) Thread-19/DefaultComponentFactory:
> ComponentFactory creating new instance of
>
org.apache.cocoon.components.source.impl.XMLDBSourceFactory.
> DEBUG   (2003-09-15) 19:15.13:216   [core.manager]
> (/info/db-news) Thread-19/DefaultComponentFactory:
> no logger attribute available, using standard logger
> DEBUG   (2003-09-15) 19:15.13:217   [core.manager]
> (/info/db-news) Thread-19/XMLDBSourceFactory:
> Initializing XML:DB connection, using driver
> org.apache.xindice.client.xmldb.DatabaseImpl
> DEBUG   (2003-09-15) 19:15.13:217   [core.manager]
> (/info/db-news) Thread-19/SourceResolverImpl:
> Resolved to systemID :
>
xmldb:xindice://localhost:8080/db/web/news-arch/#/news
> DEBUG   (2003-09-15) 19:15.13:218   [core.manager]
> (/info/db-news) Thread-19/DefaultComponentFactory:
> ComponentFactory decommissioning instance of
>
org.apache.cocoon.components.source.impl.XMLDBSourceFactory.
> DEBUG   (2003-09-15) 19:15.13:220   [core.manager]
> (/info/db-news)
> Thread-19/ExcaliburComponentSelector:
> source-factories: ComponentSelector could not find
> the component for hint
> [://localhost:8080/db/web/news-arch/]
> ^^^^^ ---------------------WHAT THIS?
> DEBUG   (2003-09-15) 19:15.13:222   [core.manager]
> (/info/db-news) Thread-19/DefaultComponentFactory:
> ComponentFactory creating new instance of
>
org.apache.cocoon.components.notification.DefaultNotifyingBuilder.
> DEBUG   (2003-09-15) 19:15.13:252   [core.manager]
> (/info/db-news) Thread-19/DefaultComponentFactory:
> ComponentFactory decommissioning instance of
>
org.apache.cocoon.components.notification.DefaultNotifyingBuilder.
> DEBUG   (2003-09-15) 19:15.13:256  
> [core.modules.input] (/info/db-news)
> Thread-19/AbstractJXPathModule: no local Classes or
> Packages
> DEBUG   (2003-09-15) 19:15.13:258   [core.manager]
> (/info/db-news) Thread-19/SourceResolverImpl:
> Resolving
> 'context://stylesheets/system/error500code2html.xsl'
> with base
> 'file:/usr/local/jakarta/catalina/testapps/cocoon/'
> in context 'file:/usr/local/jakarta/catalina/bin/'
> DEBUG   (2003-09-15) 19:15.13:258   [core.manager]
> (/info/db-news) Thread-19/SourceResolverImpl:
> Resolved to systemID :
> context://stylesheets/system/error500code2html.xsl
> DEBUG   (2003-09-15) 19:15.13:259   [core.manager]
> (/info/db-news) Thread-19/ContextSourceFactory:
> Creating source object for
> context://stylesheets/system/error500code2html.xsl
> 
> I'm confused :((, I still not migrate to cocoon2.1
> from cocoon2.0.4 
> 
> Sorry by my horrible english.
> 
> Thanks for any help!
> 
> P.S. for example, with command line I get the
> document from collection successfully
> 
> [yuryx@support catalina]$ xindice xpath -c
> /db/web/news-arch/ -q "/news[date='03.04.03']"
> <news
> xmlns:src="http://xml.apache.org/xindice/Query"
> src:col="/db/web/news-arch"
> src:key="news_00097.xml">
>   <date
>
xmlns:src="http://xml.apache.org/xindice/Query">03.04.03</date>
>     <title
>
xmlns:src="http://xml.apache.org/xindice/Query">Развитие
> сети</title>
>      <sub-title
> xmlns:src="http://xml.apache.org/xindice/Query">
>       В Ростовской области запущены в эксплуатацию
> три базовые станции сети &quot;МегаФон&quot;. 
>     </sub-title>
>     <body
> xmlns:src="http://xml.apache.org/xindice/Query">
>       Две из них призваны увеличить емкость сети в
> центральной части Ростова-на-Дону 
>       (район областной Администрации и Дома
> профсоюзов). Еще одна базовая станция 
>       расширила зону действия сети на верхнем Дону,
> в районе станицы Вешенская.
>     </body>
>  </news>
> 
> -- 
>  
> Best regards,
> Yury Mikhienko.
> IT engineer, ZAO "Mobicom-Kavkaz"
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message