Re: Cocoon 2.2 + eXist native xml db 1.2.6
I went through archive in both Cocoon and eXist mailing lists and I found some useful informations. 1. After I created new cocoon 2.2 block in maven I copied following jars to WEB-INF/lib directory : exist/exist.jar exist/exist-optional.jar exist/lib/core/antlr-2.7.6.jar exist/lib/core/commons-pool-1.4.jar exist/lib/core/xmldb.jar exist/lib/core/xmlrpc-client-3.1.1.jar exist/lib/core/xmlrpc-common.3.1.1.jar Tomek Piechowicz wrote: In eXist, pseudo-protocols are configured in Cocoon's main configuration file WEB-INF/cocoon.xconf. To make use of these protocols, simply specify the correct database driver class, as in the following example: source-handler logger=core.source-handler protocol class=org.apache.cocoon.components.source.XMLDBSourceFactory name=xmldb driver class=org.exist.xmldb.DatabaseImpl type=exist/ /protocol /source-handler 2. I`ve created my own cocoon.xconf in META-INF/cocoon/avalon/ and I put above code into it. After I run maven jetty server threw exception : org.apache.avalon.framework.configuration.ConfigurationException: Unknow document 'source-handler' 3. Then I tried another code which I`ve found somewhere in the archive : components source-factories component-instance class=org.apache.cocoon.components.source.impl.XMLDBSourceFactory name=xmldb driver class=org.exist.xmldb.DatabaseImpl type=exist/ /component-instance /source-factories /components but again server threw exception : java.lang.ClassNotFoundException: org.apache.cocoon.components.source.impl.XMLDBSourceFactory Can anyone help me with configuring cocoon to use XQueryGenerator to access eXist ? Regards, Tomasz -- View this message in context: http://www.nabble.com/Cocoon-2.2-%2B-eXist-native-xml-db-1.2.6-tp24234708p24261291.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Cocoon 2.2 + eXist native xml db 1.2.6
Hi. I`m new to Cocoon and I want to use this framework with eXist xml db which is installed locally. In section 3. Cocoon Sitemap Configuration on eXist home page (http://demo.exist-db.org/exist/configuration.xml) I found some information about defining XML:DB driver as a pseudo-protocol in Cocoon`s configuration file : In eXist, pseudo-protocols are configured in Cocoon's main configuration file WEB-INF/cocoon.xconf. To make use of these protocols, simply specify the correct database driver class, as in the following example: source-handler logger=core.source-handler protocol class=org.apache.cocoon.components.source.XMLDBSourceFactory name=xmldb driver class=org.exist.xmldb.DatabaseImpl type=exist/ /protocol /source-handler I don`t have cocoon.xconf in WEB-INF directory, so I don`t know where should I put this code. I read that there is no global cocoon.xconf in Cocoon 2.2 because each block has it`s own configuration file. Could you give me some advice how to configure Cocoon to work with eXist ? Regards, Tomek Ps: Sorry for poor english. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Cocoon and eXist
[My apologies for crossposting, but I don't know which community is best placed to answer this one.] I am going to be using Cocoon to serve a large and varied collection of XML documents and I'd like to use eXist as the search system. Cocoon is running happily within Tomcat on port 80 as the default application (by moving ROOT out of the way and renaming cocoon to ROOT within webapps) because I don't want users confused with :8080/cocoon in the URIs. 1. Where do I put the exist directory? (It was unwrapped from the .war file earlier when I tested it, before I moved ROOT). I've tried it in the Ccocoon directory, but that seems to create problems finding the classes (see http://minerva.ucc.ie/exist/). 2. The eXist documentation seems to imply that eXist comes with its own copy of Cocoon. Is this true, and if so, when I start writing queries, how will I make it use my existing Cocoon (or do I need to)? 3. Is all this even possible, or do I have to go back to keeping cocoon and exist as siblings within the original ROOT? If so, how can I still get rid of the /cocoon token from the default URIs? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon and eXist
Peter, I think you might want to integrate eXist with your existing Cocoon installation: http://wiki.exist-db.org/comments/CocoonInstall Regards Hans On 1/5/06, Peter Flynn [EMAIL PROTECTED] wrote: [My apologies for crossposting, but I don't know which community is best placed to answer this one.] I am going to be using Cocoon to serve a large and varied collection of XML documents and I'd like to use eXist as the search system. Cocoon is running happily within Tomcat on port 80 as the default application (by moving ROOT out of the way and renaming cocoon to ROOT within webapps) because I don't want users confused with :8080/cocoon in the URIs. 1. Where do I put the exist directory? (It was unwrapped from the .war file earlier when I tested it, before I moved ROOT). I've tried it in the Ccocoon directory, but that seems to create problems finding the classes (see http://minerva.ucc.ie/exist/). 2. The eXist documentation seems to imply that eXist comes with its own copy of Cocoon. Is this true, and if so, when I start writing queries, how will I make it use my existing Cocoon (or do I need to)? 3. Is all this even possible, or do I have to go back to keeping cocoon and exist as siblings within the original ROOT? If so, how can I still get rid of the /cocoon token from the default URIs? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Cocoon and eXist
I think it should work, when you putt the directory in the Wepapps folder of Tomcat. You can then access the Admin-Page over http://localhost:8080/exist It shouldn't matter if you put Cocoon as ROOT-Folder or in a separate Folder under Webapps. -Ursprüngliche Nachricht- Von: Peter Flynn [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Januar 2006 12:34 An: users@cocoon.apache.org Cc: [EMAIL PROTECTED] Betreff: Cocoon and eXist [My apologies for crossposting, but I don't know which community is best placed to answer this one.] I am going to be using Cocoon to serve a large and varied collection of XML documents and I'd like to use eXist as the search system. Cocoon is running happily within Tomcat on port 80 as the default application (by moving ROOT out of the way and renaming cocoon to ROOT within webapps) because I don't want users confused with :8080/cocoon in the URIs. 1. Where do I put the exist directory? (It was unwrapped from the .war file earlier when I tested it, before I moved ROOT). I've tried it in the Ccocoon directory, but that seems to create problems finding the classes (see http://minerva.ucc.ie/exist/). 2. The eXist documentation seems to imply that eXist comes with its own copy of Cocoon. Is this true, and if so, when I start writing queries, how will I make it use my existing Cocoon (or do I need to)? 3. Is all this even possible, or do I have to go back to keeping cocoon and exist as siblings within the original ROOT? If so, how can I still get rid of the /cocoon token from the default URIs? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Exist-open] Re: Cocoon and eXist
On Thu, 2006-01-05 at 11:48, Jonas Lundberg wrote: Peter, I think you might want to integrate eXist with your existing Cocoon installation: http://wiki.exist-db.org/comments/CocoonInstall Thanks, I'd somehow missed that page. I'll give it a try. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Exist-open] Re: Cocoon and eXist
Peter Flynn wrote: On Thu, 2006-01-05 at 11:48, Jonas Lundberg wrote: Peter, I think you might want to integrate eXist with your existing Cocoon installation: http://wiki.exist-db.org/comments/CocoonInstall Thanks, I'd somehow missed that page. I'll give it a try. Hi, maybe I'm missing something, but if you integrate eXist with Cocoon, don't you exclude the possibility beforehand of moving eXist out to it's own server when the going get's rough? I have installed eXist on a separate machine and use XML-RPC to access it from cocoon. That way it doesn't matter where eXist is installed anymore, local and remote are the same (except for the initialisation of course). Isn't it also easier that way to upgrade eXist or cocoon independently? Regards, Huib. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon and eXist
You may also have a look at http://wiki.apache.org/cocoon/EXistInCocoon Just a few jars to add and some web.xml changes, an old cocoon release is mentioned there but it worked for me. From what i remember, the cocoon app in eXist is just a light application. Phil Jonas Lundberg wrote: Peter, I think you might want to integrate eXist with your existing Cocoon installation: http://wiki.exist-db.org/comments/CocoonInstall Regards Hans On 1/5/06, Peter Flynn [EMAIL PROTECTED] wrote: [My apologies for crossposting, but I don't know which community is best placed to answer this one.] I am going to be using Cocoon to serve a large and varied collection of XML documents and I'd like to use eXist as the search system. Cocoon is running happily within Tomcat on port 80 as the default application (by moving ROOT out of the way and renaming cocoon to ROOT within webapps) because I don't want users confused with :8080/cocoon in the URIs. 1. Where do I put the exist directory? (It was unwrapped from the .war file earlier when I tested it, before I moved ROOT). I've tried it in the Ccocoon directory, but that seems to create problems finding the classes (see http://minerva.ucc.ie/exist/). 2. The eXist documentation seems to imply that eXist comes with its own copy of Cocoon. Is this true, and if so, when I start writing queries, how will I make it use my existing Cocoon (or do I need to)? 3. Is all this even possible, or do I have to go back to keeping cocoon and exist as siblings within the original ROOT? If so, how can I still get rid of the /cocoon token from the default URIs? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Cocoon and eXist
On Thu, 2006-01-05 at 12:00, Christian Barth wrote: I think it should work, when you putt the directory in the Wepapps folder of Tomcat. You can then access the Admin-Page over http://localhost:8080/exist It shouldn't matter if you put Cocoon as ROOT-Folder or in a separate Folder under Webapps. No, that cannot work. If I replace ROOT with cocoon, then all requests (eg localhost/exist) will seek exist in the ROOT (=cocoon) directory. ///Peter -Ursprüngliche Nachricht- Von: Peter Flynn [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Januar 2006 12:34 An: users@cocoon.apache.org Cc: [EMAIL PROTECTED] Betreff: Cocoon and eXist [My apologies for crossposting, but I don't know which community is best placed to answer this one.] I am going to be using Cocoon to serve a large and varied collection of XML documents and I'd like to use eXist as the search system. Cocoon is running happily within Tomcat on port 80 as the default application (by moving ROOT out of the way and renaming cocoon to ROOT within webapps) because I don't want users confused with :8080/cocoon in the URIs. 1. Where do I put the exist directory? (It was unwrapped from the .war file earlier when I tested it, before I moved ROOT). I've tried it in the Ccocoon directory, but that seems to create problems finding the classes (see http://minerva.ucc.ie/exist/). 2. The eXist documentation seems to imply that eXist comes with its own copy of Cocoon. Is this true, and if so, when I start writing queries, how will I make it use my existing Cocoon (or do I need to)? 3. Is all this even possible, or do I have to go back to keeping cocoon and exist as siblings within the original ROOT? If so, how can I still get rid of the /cocoon token from the default URIs? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Exist-open] Re: Cocoon and eXist
On Thu, 2006-01-05 at 12:31, Huib Verweij wrote: Peter Flynn wrote: On Thu, 2006-01-05 at 11:48, Jonas Lundberg wrote: Peter, I think you might want to integrate eXist with your existing Cocoon installation: http://wiki.exist-db.org/comments/CocoonInstall Thanks, I'd somehow missed that page. I'll give it a try. Hi, maybe I'm missing something, but if you integrate eXist with Cocoon, don't you exclude the possibility beforehand of moving eXist out to it's own server when the going get's rough? I have installed eXist on a separate machine and use XML-RPC to access it from cocoon. That way it doesn't matter where eXist is installed anymore, local and remote are the same (except for the initialisation of course). Isn't it also easier that way to upgrade eXist or cocoon independently? I'm sure that is ideal if you can afford to buy a new machine for each application. Unfortunately this is a university, so both cocoon and exist must run on this PIII. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integration of Cocoon and eXist - user/password accessing database
You can use org.exist.cocoon.XMLDBSessionLoginAction to login to the database. Regards, Suzan Foster. -- Christoph Hermann wrote: Hello, i'm trying to integrate Cocoon and eXist XML DB. So far it works fine, i can edit and save a document through cforms and the bindings, but this is only working if i make the documents in my collection world-writable/updatable. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integration of Cocoon and eXist - user/password accessing database
Christoph Hermann schrieb: Hello, i'm trying to integrate Cocoon and eXist XML DB. So far it works fine, i can edit and save a document through cforms and the bindings, but this is only working if i make the documents in my collection world-writable/updatable. So my question is: where do i specify which user/password is used when accessing the eXist database (i would like to do this in flow (if possible) alternatively which configuration file handles this)? I now wrote a new saveDocumentAuth() function for this: ---snip--- var form = new Form(cforms/definition/test_def.xml); var bindingURI = cforms/binding/test_bind.xml; form.createBinding(bindingURI); var docBaseURI = xmldb:exist:///db/test/; var docName = test.xml; var document = loadDocument(docBaseURI + docName); form.load(document); form.showForm(test-display-pipeline); form.save(document); // saveDocument(document, docURI); saveDocumentAuth(document, test.xml, docBaseURI, user, pass, true); and the function looks like this: ---snip--- function saveDocumentAuth(document, docname, dburi, user, password, overwrite) { // exist API http://exist.sourceforge.net/api/index.html // XMLUtils API http://cocoon.apache.org/2.1/apidocs/ importClass(Packages.org.xmldb.api.DatabaseManager); importClass(Packages.org.xmldb.api.base.Collection); importClass(Packages.org.xmldb.api.modules.XMLResource); importClass(Packages.org.apache.excalibur.xml.sax.SAXParser); // Error Messages var _errmsg = null; var _errdesc = null; // set the document xml data var xmldata = Packages.org.apache.cocoon.xml.XMLUtils.serializeNodeToXML(document); // Collection (org.xmldb.api.base.Collection) var collection = null; // ressource (org.xmldb.api.modules.XMLResource) var _resource = null; try { collection = DatabaseManager.getCollection(dburi, user, password); collection.setProperty(sax-document-events, false); try { _resource = collection.getResource(docname); if(_resource != null) { if(overwrite.equals(true)) { collection.removeResource(_resource); _resource = collection.createResource( docname, XMLResource ); _resource.setContent(xmldata); collection.storeResource(_resource); } else { _errmsg = Resource + docname + does already exist; _errdesc = Resource + docname + does already exist; cocoon.log.error(_errmsg); cocoon.log.error(_errdesc); } } else { _resource = collection.createResource( docname, XMLResource ); _resource.setContent(xmldata); collection.storeResource(_resource); } } catch(_ex) { // XMLDBException _errmsg = _ex.getMessage; _errdesc = Failed to store document + docname; cocoon.log.error(_errmsg); cocoon.log.error(_errdesc); } } catch(_e) { // XMLDBException _errmsg = _e.toString(); _errdesc = Failed to get collection + dburi; cocoon.log.error(_errmsg); cocoon.log.error(_errdesc); } } ---snap--- So if anyone is able to use this, or to find a better way of handling this, feel free to modify it to your needs. With kind regards, Christoph Hermann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Integration of Cocoon and eXist - user/password accessing database
Hello, i'm trying to integrate Cocoon and eXist XML DB. So far it works fine, i can edit and save a document through cforms and the bindings, but this is only working if i make the documents in my collection world-writable/updatable. So my question is: where do i specify which user/password is used when accessing the eXist database (i would like to do this in flow (if possible) alternatively which configuration file handles this)? What i basically do is the following (in flow): ---snip--- var form = new Form(cforms/definition/test_def.xml); var bindingURI = cforms/binding/test_bind.xml; form.createBinding(bindingURI); var docURI = xmldb:exist:///db/test/test.xml; var document = loadDocument(docURI); form.load(document); form.showForm(test-display-pipeline); form.save(document); saveDocument(document, docURI); ---snap--- The functions loadDocument and saveDocument are taken from the samples. When the document is not writable for everyone i get the following error: ---snip--- org.exist.security.PermissionDeniedException: Document exists and update is not allowed at org.exist.collections.Collection.checkPermissions(Collection.java:1263) at org.exist.collections.Collection.determineTreeStructure(Collection.java:1099) at org.exist.collections.Collection.validate(Collection.java:851) at org.exist.xmldb.LocalCollection.storeXMLResource(LocalCollection.java:589) ... ---snap--- Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon and eXist integration
Hello all. I'm interested in integrating eXist XML DB and Cocoon. Who knows about that? -- Sincerely, Arsen A. Gutsal SOFTSKY Ltd CEO/Executive SOFTSKY - Cost effective Software Development - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon and eXist integration
Arsen A. Gutsal wrote: Hello all. I'm interested in integrating eXist XML DB and Cocoon. Who knows about that? Start here: http://wiki.apache.org/cocoon/HowTos Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon and eXist integration
http://wiki.exist-db.org/space/CocoonInstall http://exist.sourceforge.net/devguide.html#N1048E gr wim On 4/14/05, Arsen A. Gutsal [EMAIL PROTECTED] wrote: Hello all. I'm interested in integrating eXist XML DB and Cocoon. Who knows about that? -- Sincerely, Arsen A. Gutsal SOFTSKY Ltd CEO/Executive SOFTSKY - Cost effective Software Development - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- wim den ouden www.flexthe.net senior java internet programmer/analist - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]