Hello
I'd like to ask you something ladies and gentelmen
I'm using Cocoon 2.0.3 on linux box 2.4.19 with Sun jdk 1.4
I'm developing small portal with Cocoon and I'v encountered a strage, for me at least, problem
this is my map:generators secion in sitemap
<map:generators default="file" >
<map:generator name="file" src="org.apache.cocoon.generation.FileGenerator" label="content"/>
<map:generator name="xmldb" src="org.apache.cocoon.generation.XMLDBGenerator" label="content">
<driver>org.apache.xindice.client.xmldb.DatabaseImpl</driver>
<base>xmldb:xnidice:///db/</base>
</map:generator>
<map:generator name="xmldbcollection" src="org.apache.cocoon.generation.XMLDBGenerator"
label="content">
<driver>org.apache.xindice.client.xmldb.DatabaseImpl</driver>
<base>xmldb:xnidice:///db/</base>
</map:generator>
</map:generators>
and here is part of map:pipelines section
<map:pipeline >
<map:match pattern="xmldb/*/*">
<map:generate src="xmldb:xindice://localhost:4080/db/{1}/#/{2}"/>
<map:serialize type="xml" />
</map:match>
<map:match pattern="">
<map:generate src="content/templates/page.xml" />
<map:transform type="cinclude" />
<map:serialize />
</map:match>
</map:pipeline>
CInclude file looks like this:
.....
<page xmlns:cinclude="http://apache.org/cocoon/include/1.0" >
<cinclude:include src="cocoon:/xmldb/articles/article[ @id = 'header' ]" element="panel"/>
<cinclude:include src="cocoon:/xmldb/articles/article[ @id = 'leftMenu' ]" element="panel"/>
<cinclude:include src="cocoon:/xmldb/articles/article[ @id = 'body' ]" element="panel"/>
<cinclude:include src="cocoon:/xmldb/articles/article[ @id = 'foot' ]" element="panel"/>
</page>
.....
Everything is working but ....there always is some BUT :-)
1) Sometimes Cocoon retreives only one or two dokuments from Xindice not all four and in such
situations Xindice is produceing this :
DEBUG>
java.lang.NullPointerException
at org.apache.xindice.core.DocumentCache$CacheKey.equals(DocumentCache.java:171)
at java.util.WeakHashMap.eq(WeakHashMap.java:256)
at java.util.WeakHashMap.get(WeakHashMap.java:348)
at org.apache.xindice.core.DocumentCache.getDocument(DocumentCache.java:79)
at org.apache.xindice.core.Collection.getDocument(Collection.java:711)
at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(XPathQueryResolver.java:1003)
at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.getNextNode(XPathQueryResolver.java:1042)
at org.apache.xindice.client.corba.CollectionServant.queryWrapper(CollectionServant.java:385)
at
org.apache.xindice.client.corba.CollectionServant.queryCollection(CollectionServant.java:425)
at org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:332)
at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
at org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:750)
at org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467)
at org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:1410)
at org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77)
at org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557)
2 ) Which generator am I using XMLDBGenerator or default FileGenerator ?
I've tried to add type attribute (type="xmldb" ) to the generator
-> <map:generate type="xmldb" src="xmldb:xindice://localhost:4080/db/{1}/#/{2}"/>
and Cocoon has produced errors
What am I doing wrong or where can I find some info?
Sorry for such a long post :-)
--
Best Regards
Conrad
[EMAIL PROTECTED]
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>