typo in daisy doc
hi a little typo in daisy doc http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1303.html xmlns:configurator=http://cocoon.apache.org/schame/configurator; but should be xmlns:configurator=http://cocoon.apache.org/schema/configurator; (schame - schema) Alex -- View this message in context: http://www.nabble.com/typo-in-daisy-doc-tf4034226.html#a11460446 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: feedback: starting examples in trunk
Grzegorz Kossakowski-3 wrote: Alex, thanks for your effort of reporting all the issues. Such a thorough testing is of course very valuable and informative but we have to think what's to do now. no problem. Grzegorz Kossakowski-3 wrote: Do you feel that you would be able to help us fix some of them? After taking a quick look at your report I think that some would be quite easy to repair because only some paths are broken because of several refactorings. I would like to be able to fix them - but unfortunatly with my current Java and Cocoon knowledge I do not think that I am able beyond testing. If you can give me one solving sample what may be caused by a path problem and how to diag / fix this - then I think I will be able to apply on other cases on this kind of problem. I am still learning... Grzegorz Kossakowski-3 wrote: Could you fill bug reports for at least portion of your findings and preferably submit patch fixing the issue? Of course flood of issues will not help us that much but gradual informing should. Yes, putting that to a ticket system is possible for me. As I said in the report - I cannot assume (right now) which samples should run and which not (beacuse they are old stuff). Alex -- View this message in context: http://www.nabble.com/feedback%3A-starting-examples-in-trunk-tf3971847.html#a11462659 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: cocoon 2.2 - some more questions
...and another one :-) Is there a way to trace how the http is proceed inside sitemap co? I have read about a profiler, but this one seems not to exists in 2.2 (so far). Thanks in advance Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11421163 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: cocoon 2.2 - some more questions
ok, here is one more - sorry :-) is it possible to call java directly from sitemap.xmap - so that java is the flow language? I looked up in the docs but did not find something like that. If its possible - is the a docs like it is for flowscript? Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11400315 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
cocoon 2.2 - some more questions
hi, actually i'm trying to get a 2.2 based thingy up and running. Based on the existing daisy docs there are some questions open for me. Current questions: 1.) the demo-application-context.xml file what about that filename - must it reflect the package name? Or must there only be a file ending with ..-application-context.xml. Is there only one of this files for all packages in that block? 2.) as in the tutorials i have two or more blocks and one webapp type folders. I fire up the webapp part with mvn jetty:run inside it. Unfortuanatly the rcl (reloading on change) stuff did not work. Is there a way to get it also up when started via webapp part? Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11382520 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: cocoon 2.2 - some more questions
If you follow tutorials really carefully RCL plug-in must work for you, it has been tested rather thoroughly. Yes for Block(s) the RCL is working. Seems I am still struggeling how to pu the parts together :-) archetype webapp is the last part in development. I thought I could use it as a kind of config holder for my other blocks (e.g. property files for other blocks)- which should be tied together for a plugin like structure. So for me it seems I am in the need to have this config-part to be a block archetype - because I can use the RCL feature of it for development. Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11382998 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: cocoon 2.2 - some more questions
well i am thinking of a portal. So there will be a core block (to manage the main sitemap), one or more skin blocks for final layout, some lib-blocks for extending the core with e.g. database, mail and that kind of functionality. And modules like blocks for features to the portal (the ones who will provide the content). That as a generic portal (combination). Now you want to have a concrete portal with that parts. Instead of modifying settings in core (and database) for the concrete informations, and what modules to use (maybe you do not want to have the module-tictactoe in your portal) all you need to do is not to set the dependency to that module in the webapp pom.xml. So that is the kind of configurations-block i had in mind. I know there is a portal in Cocoon 2.1 and there will be one in 2.2 (at least i think so). Maybe that approach i have in mind is a bit more spring like to set the parts together. I dont even know if it possible. Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11383411 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: cocoon 2.2 - some more questions
Grzegorz Kossakowski-3 wrote: I see. I think you have described the use case for C2.2 architecture. It's basically what blocks has been designed for (but not only for such situations). wow - i am glad to know my crystalball is still working ;-) Most of the infrastructure is already there (especially configuration, building and packaging parts). building and packaging via maven? I have discovered that ones (thanks to the tutorial steps) configuration? well - you mean the pom.xml things? The only part still under development is wiring (servlet-service-fw). With blocks polymorphism (see COCOON-2038 issue) and postable source (see COCOON-2046) you will get all needed tools to handle even more sophisticated set-ups. polymorphism would be nice for the database implementation of the concrete drivers (backend). For wiring beyond spring block i thought i could use something like inner piplelines. If you have concrete question (how to achieve x) feel free to ask, I'll be happy to answer them only if I can help. yes, there are a lot of question (which is still first try to figure out myself). But here is one: rcl.properties reads like: com.mycompany.myBlock2.block%classes-dir=../myBlock2/target/classes %exclude-lib=com.mycompany:myBlock2 ok, i can guess the first line - but why (and when) to exclude libs? The doc http://cocoon.zones.apache.org/daisy/cdocs/g1/g5/g1/g1/1298.html does not give that much detailed information yet Alex -- View this message in context: http://www.nabble.com/cocoon-2.2---some-more-questions-tf4008051.html#a11384177 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
feedback: starting examples in trunk
hi, here some feedback to current examples startet from trunk as guessed in README On Startup: ERROR [main] (ContextLoader.java:203) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cocoon.spring.configurator.BlockResourcesHolder': Invocation of init method failed; nested exception is java.io.FileNotFoundException: /home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-core-main-sample/hello-world/style/xsl/page2svg.xsl (Too many open files) Caused by: java.io.FileNotFoundException: /home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-core-main-sample/hello-world/style/xsl/page2svg.xsl (Too many open files) at java.io.FileOutputStream.open(Native Method) i increased ulimit to 4096 to get it up. == all links in samples page Back - to Cocoon Blocks Samples main page point to http://127.0.0.1:/blocks/ but it should be http://127.0.0.1:/samples/ == Wiki editor - In this example the parser is used to build an online editor, which is based on the very popular syntax of Wiki. this link http://127.0.0.1:/blocks/cocoon-chaperon-sample/view.do?page=index causes Message: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Exception occured while copying response from the service to the output stream Description: javax.servlet.ServletException: Failed to process pipeline at map:serialize type=servletService - == same for http://127.0.0.1:/blocks/cocoon-chaperon-sample/view.do?page=selftest == Syntax highlighting example Example 1 - The parser can also be used to colorize some source code. Example 2 - This example show a another view of a java class, similar to javadoc. (The first use takes 2-3 minutes, for the parser table generation process.) both are looking for a file: http://svn.apache.org/viewvc/*checkout*/cocoon-2.1/src/java/org/apache/cocoon/Cocoon.java which does not exist == http://127.0.0.1:/blocks/cocoon-fop-sample/misc/svgtest.pdf says: HTTP ERROR: 500 org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge/BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Context; RequestURI=/blocks/cocoon-fop-sample/misc/svgtest.pdf == http://127.0.0.1:/blocks/cocoon-imageop-sample/logo2.png/grayscale says: Message: Source or Destination ColorSpace is undefined Description: javax.servlet.ServletException: Failed to process reader at map:read type=image-op-grayscale - file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-imageop-sample/sitemap.xmap:72:57 at map:match - file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-imageop-sample/sitemap.xmap:71:40 == http://127.0.0.1:/blocks/cocoon-lucene-sample/findIt?queryString=lucene says: Problem in creating the Request Message: /home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/index not a directory Description: javax.servlet.ServletException: Failed to process pipeline at map:serialize same for Index2 == http://127.0.0.1:/blocks/cocoon-bsf-sample/generator/hello.gy says: Message: org.codehaus.groovy.bsf.GroovyEngine Description: javax.servlet.ServletException: BSFException in ScriptGenerator.generate() at map:serialize type=xml ... cause java.lang.ClassNotFoundException: org.codehaus.groovy.bsf.GroovyEngine == http://127.0.0.1:/blocks/cocoon-javaflow-sample/ Message: org.apache.cocoon.samples.reloading.MyGenerator Description: javax.servlet.ServletException: Unable to read Avalon configuration from 'sitemap.xmap'.; nested exception is org.apache.avalon.framework.configuration.ConfigurationException: Unable to create class for component with role org.apache.cocoon.generation.Generator/mygenerator with class: org.apache.cocoon.samples.reloading.MyGenerator == http://127.0.0.1:/blocks/cocoon-validation-sample/report-rng-valid says: Message: line 203: Syntaxfehler in '*[text()][not(* or comment() or processing-instruction())]'. file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-samples-style-default/stylesheets/system/xml2html.xslt: line 112: Fehler bei Syntaxanalyse des XPath-Ausdrucks '*[text()][not(* or comment() or processing-instruction())]'. same for all ValidationReportTransformer Samples == http://127.0.0.1:/blocks/cocoon-stx-sample/hello.html says: cause javax.xml.transform.TransformerException: stylesheet erfordert das Attribut version. location file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-stx-sample/page2html.stx (translated: stylesheet requires attribute version) Same fpr all STX samples == http://127.0.0.1:/blocks/cocoon-apples-sample/form2xml.flow says: org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: form2xml.flow
Re: [test] Cocoon 2.2-RC1 others (take 2)
Grzegorz Kossakowski-3 wrote: It's odd. Can you send us zipped myBlock1 and myBlock2 directories? It would allow me to help you effectively. hi Grzegorz. Sure. This Nabble Forum do not let me add attachments. I send you a direct mail via Nabble. Alex -- View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11274504 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: feedback: starting examples in trunk
Part II http://127.0.0.1:/blocks/cocoon-deli-sample/deli.html returns no error - but a empty body tag. == http://127.0.0.1:/blocks/cocoon-petstore-sample/viewCategory.do?categoryId=FISH the first click will result in a table not found message. With the second try the main pages loads. However, clicking on a detail link like the one above results in cause org.mozilla.javascript.EvaluatorException: file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-petstore-sample/flow/petstore.js, line 50: Inappropriate array length. == cForms - nice examples. Some of them saying java.lang.OutOfMemoryError: Java heap space. Other kills my cpu with 100% usage. Maybe something is going wrong here. They have been run faster and smoothly with 2.1.10 Also I tryied to run http://127.0.0.1:/blocks/cocoon-eventcache-sample/ after those samples with the OutOfMemory error. After restarting jetty:run it loads successfully. == Portal: it still has the wrong link http://127.0.0.1:/blocks/cocoon-portal-sample/. It should be http://127.0.0.1:/samples/cocoon-portal-sample/portal Even with that i receive: varible not found with name dojo-resources resource://org/apache/cocoon/forms/resources/forms-field-styling.xsl - 87:69 == http://127.0.0.1:/blocks/cocoon-jms-sample/ cause org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: == http://127.0.0.1:/blocks/cocoon-profiler-sample/caching-testsite.html java.lang.NullPointerException javax.servlet.ServletException: Sitemap: error invoking matcher at map:match - file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-profiler-sample/sitemap.xmap:49:50 at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:232) == http://127.0.0.1:/blocks/cocoon-core-main-sample/flow/prefs/ cause org.mozilla.javascript.EcmaError: TypeError: getUserRegistry is not a function, it is org.mozilla.javascript.NativeJavaPackage. (file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-core-main-sample/flow/prefs/prefs.js#30) == http://127.0.0.1:/blocks/cocoon-core-main-sample/spring/ cause org.mozilla.javascript.EcmaError: TypeError: Cannot find function getUploadDirectory. (file:/home/xweber/tmp/cocoon/cocoon-2.2/core/cocoon-webapp/target/work/blocks/cocoon-core-main-sample/spring/flow/flow.js#26) == Scratchpad: some of them does not work. Because of the name this may be a wanted behavior. Alex -- View this message in context: http://www.nabble.com/feedback%3A-starting-examples-in-trunk-tf3971847.html#a11275112 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: [test] Cocoon 2.2-RC1 others (take 2)
Grzegorz Kossakowski-3 wrote: src/main/resources/META-INF/cocoon/spring/servlet-service.xml broken: bean id=com.mycompany.myBlock1.block class=org.apache.cocoon.sitemap.SitemapServlet servlet:context mount-path=/myBlock1 context-path=blockcontext:/myBlock1// servlet:connections entry key=myBlock2 value-ref=com.mycompany.myBlock2.block/ /servlet:connections /bean Notice that servlet:connections is _not_ inside servlet:context tag (it's not open at all). It should be: bean id=com.mycompany.myBlock1.block class=org.apache.cocoon.sitemap.SitemapServlet servlet:context mount-path=/myBlock1 context-path=blockcontext:/myBlock1/ servlet:connections entry key=myBlock2 value-ref=com.mycompany.myBlock2.block/ /servlet:connections /servlet:context /bean Yes and that was the cause! Its running now - 10k Thanx for that Alex -- View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11275862 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: [test] Cocoon 2.2-RC1 others (take 2)
Hi, I tried to follow the tutorials with latest rc1 files. (http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html) On the connecting example (Connect two blocks) I receive an error like java.lang.RuntimeException: Cannot invoke listener [EMAIL PROTECTED] .. Unable to read spring configurations from classpath .. on mvn jetty:run startup Maybe it is related to the rc1 build. Alex -- View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11267783 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: [test] Cocoon 2.2-RC1 others (take 2)
Hi Grzegorz, Grzegorz Kossakowski wrote: I think you found little trap in our current setup. When two blocks containing demo classes are connected they define exactly the same Spring component (same package and same component id) twice. In my setup this does not lead to exception, just first Java class and last declaration of component is used. Try to change a class name/package and Spring Id of the component (don't forget to change in flowscript too) and everything should be working fine. Please report if it's the case. Sure, i would like to test it but unfortunately i have no clue what files/lines to change. The doc part for this (http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g4/1268.html) is near empty. So I cannot figure what part means component id. I beg your pardon for this - i am just starting with cocoon. Grzegorz Kossakowski wrote: I don't think it's show-stopper for release, we just should put an information about work-around in docs and fix it in RC2 that would follow RC1 quickly (I hope you all remember independent release cycles). Yesterday I have run the examples from a svn build. There have been some error messages and dead pages while clicking through all the links. Haven't tried if a example webapp build is possible with the to rc1 released files (i am just a beginner with cocoon - so i would need a little howto). e.g. in cocoon-validation-sample's sitemap.xmap is a map:serialize type=servletService - count the Maybe it's a wanted syntax error for validation to check something. If you want i can run through all examples in rc1 and give a more complete list of problems. Alex -- View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11268794 Sent from the Cocoon - Dev mailing list archive at Nabble.com.
Re: [test] Cocoon 2.2-RC1 others (take 2)
Hi Grzegorz, Component (Spring beans) configurations files can be found at src/main/resources/META-INF/cocoon/spring. Before we change id of spring bean to make it unique we have to rename java class as well. Here are instructions (everything should be done in myBlock2 from the tutorial): 1. Rename Java class demo.myBean to demo.myBean2. The class can be found at src/main/java 2. Open src/main/resources/META-INF/cocoon/spring/demo-application-context.xml for edition and change following part: bean id=demo2 class=demo.MyBean2 scope=singleton property name=message value=This is a message coming from a Spring bean./ /bean 3. We need to update flowscript code to make it picking up new component. Open src/main/resources/COB-INF/flow/spring-bean.js and change this line: var demoBean = cocoon.getComponent(demo); so it looks: var demoBean = cocoon.getComponent(demo2); Run jetty:run from myBlock1 and everything (I hope) should be working. RCL [create]: /home/xweber/tmp/cocoon/test/myBlock1/./target/classes/demo/MyBean.class 2007-06-23 23:11:02.460:/:INFO: Initializing Spring root WebApplicationContext 2007-06-23 23:11:03.961::WARN: Failed startup of context [EMAIL PROTECTED] ... Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unable to read spring configurations from classpath*:META-INF/cocoon/spring; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionDecorator for element [connections] ... Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionDecorator for element [connections] on the jetty:run step. So browser says: HTTP ERROR: 503 SERVICE_UNAVAILABLE RequestURI=/myBlock1/ Powered by jetty:// I even tried it with a clean second dir + attempt to build the steps. Alex -- View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11270315 Sent from the Cocoon - Dev mailing list archive at Nabble.com.