cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: FAQs
Date Fri, 15 Oct 2004 23:29:25 GMT
   Date: 2004-10-15T16:29:25
   Editor: JoergHeinicke <joerg.heinicke@gmx.de>
   Wiki: Cocoon Wiki
   Page: FAQs
   URL: http://wiki.apache.org/cocoon/FAQs

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -2,11 +2,11 @@
 
 This FAQ is organized in sections:
 
- 1.Meta-FAQ - Questions and Answers about the FAQ itself.
- 1.General Orientation - How do I get started?
- 1.Cocoon Nuts-n-Bolts - What does '''this''' mean/do?
- 1.Configuration - Specific configuration details
- 1.Common Problems - Why am I getting this error message?
+ 1. Meta-FAQ - Questions and Answers about the FAQ itself.
+ 1. General Orientation - How do I get started?
+ 1. Cocoon Nuts-n-Bolts - What does '''this''' mean/do?
+ 1. Configuration - Specific configuration details
+ 1. Common Problems - Why am I getting this error message?
 
 
 ==  Meta-FAQ ==
@@ -24,22 +24,22 @@
 
 === Problems following install instructions using cocoon 2.0.4 ===
 
- Q: Hi, today I tried to install cocoon 2.0.4 using the Tomcat version 5.0.16 and 5.0.18.
I copied the cocoon.war into the webapps directory of Tomcat, as explained, but it (Tomcat)
was not able to start the application(same after several restarts and reboots). There was
a message pointing this out on the application-management-page of Tomcat and in the console
monitor. In the console monitor there were several fatal errors (SCHWERWIEGENDER FEHLER in
german) listed. The first suspicious message is a
+Q: Hi, today I tried to install cocoon 2.0.4 using the Tomcat version 5.0.16 and 5.0.18.
I copied the cocoon.war into the webapps directory of Tomcat, as explained, but it (Tomcat)
was not able to start the application(same after several restarts and reboots). There was
a message pointing this out on the application-management-page of Tomcat and in the console
monitor. In the console monitor there were several fatal errors (SCHWERWIEGENDER FEHLER in
german) listed. The first suspicious message is a
 "'''WARNING: exception while expanding web application archive cocoon.war'''", followed by
a 
 fatal error: "'''Error in dependencyCheck'''" which is followed by a strange regular message:
-"'''java.util.zip.!ZipException: invalid entry size(expected 2472738816 but got 48 bytes)'''"
???
+"'''java.util.zip.!ZipException: invalid entry size(expected 2472738816 but got 48 bytes)'''"???
 I'm using XP pro and tried java versions 1.4.1, 1.4.2 and 1.5_beta using the appropriate
Win_VM_1.4-binaries but nothing helped.
 Does anyone have an explanation for this? If so, or if you know another way to get cocoon
running please drop me a line, thank you.
-;:Sounds like the zip file was corrupted (probably when you downloaded it). Try downloading
it again.
-;:There is also a [http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26392 bug] in our bugzilla
database though not confirmed. Maybe you can add your observations there too. It would also
be good to know whether an updated Batik JAR solves the problem.
+
+A: Sounds like the zip file was corrupted (probably when you downloaded it). Try downloading
it again. There is also a [http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26392 bug] in
our bugzilla database, but this one should be fixed and it had a different error message.
 
 === How to use build in Cocoon 2.1 ===
- Q: I see that the build is creating directories cocoon-2.1.3 and webapps in build-directory.
-What to do with these directories and to get it work with Tomcat 5 ? Earlier just drop the
cocoon.war file to webapps-directory ?????
 
- A: There are at least several ways to deploy webapps on different containers and not all
depend on a .war file.  Tomcat supports mounting webapps located in any location on the filesystem
- see the Tomcat documentation for the most accurate information on how to do this.  Still,
building a .war file is quite easy in Cocoon using the "war" build target.  The default target
is "webapp".  For more info see AboutTheBuildTargets or run "build -projecthelp".
+Q: I see that the build is creating directories cocoon-2.1.3 and webapps in build-directory.
What to do with these directories and to get it work with Tomcat 5? Earlier just drop the
cocoon.war file to webapps-directory?
+
+A: There are at least several ways to deploy webapps on different containers and not all
depend on a .war file.  Tomcat supports mounting webapps located in any location on the filesystem
- see the Tomcat documentation for the most accurate information on how to do this.  Still,
building a .war file is quite easy in Cocoon using the "war" build target.  The default target
is "webapp".  For more info see AboutTheBuildTargets or run "build -projecthelp".
 
- A: An installation using the '''webapp''' subdirectory is shown in CocoonEasyInstallation.
+A: An installation using the '''webapp''' subdirectory is shown in CocoonEasyInstallation.
 
 Q: I was having an XML parsing error when trying to install Cocoon 2.1.4 into Tomcat 4.1.24.
 
@@ -75,20 +75,13 @@
 
 ==  Cocoon Nuts-n-Bolts ==
 
-
 Q: What is XSP?
 
-A: Read XSP
-
-
-Q: I know that the [:Serializer] "turns a series of SAX events into an XML document".  Can
someone explain (in clear English if possible ;-) what this '''actually''' means.  What are
"events" and how do they differ from "documents" (from the machine's or my point of view).
 And '''how''' does this happen?
+A: Read [:XSP].
 
-A: Thanks for asking, have a look at the updated [:SAX] page.
+Q: I know that the [:Serializer] "turns a series of SAX events into an XML document". Can
someone explain (in clear English if possible ;-) what this '''actually''' means.  What are
"events" and how do they differ from "documents" (from the machine's or my point of view).
 And '''how''' does this happen?
 
-A2: This sounds like a SAX stream goes into a Serializer and an XML stream document comes
out. While
-this might technically be true, I don't know, you can also serialize to some different format,
-like PDF or Excel 97 (which are anything but xml).
- 
+A: Thanks for asking, have a look at the updated [:SAX] page. 
 
 ==  Configuration ==
 
@@ -98,7 +91,7 @@
 
 Due to its many responsibilities, the sitemap is fairly complex. In order to learn, I suggest
you go for the basics first:
  1. MinimalSitemapConfiguration shows you a basic template to build from.
- 1. SimpleTransformations shows you how to map a set of URL:s to a set of source XML-files
run through some XSLT transformations (this is core Cocoon functionality).
+ 1. SimpleTransformations shows you how to map a set of URLs to a set of source XML-files
run through some XSLT transformations (this is core Cocoon functionality).
 
  1. ServingStaticFiles shows you how to tell Cocoon to serve other resources (without any
transformations or fiddling), just like a web server does.
 
@@ -106,7 +99,7 @@
 
 === How do I create a database connection pool? ===
 
-See ConnectionPooling
+See ConnectionPooling.
 
 === How to use Saxon as the default XSLT processor? ===
 
@@ -114,8 +107,7 @@
 
 === My applet jar/CSS file/image isn't being served by Cocoon. ===
 
-Unlike a web server, Cocoon doesn't serve static files by default. You have to tell it how.
See ServingStaticFiles
-
+Unlike a web server, Cocoon doesn't serve static files by default. You have to tell it how.
See ServingStaticFiles.
 
 ==  General Problems ==
 
@@ -133,9 +125,11 @@
 
 This is discussed in [:HTMLGenerator].
 
-=== I get  ==={{{java.lang.ArrayIndexOutOfBoundsException}}} in org.xml.sax.helpers.!AttributesImpl.removeAttribute(!AttributesImpl.java:439)
when using i18n transformer to translate attributes.
+=== I18nTransformer ===
+
+Q: I get {{{java.lang.ArrayIndexOutOfBoundsException}}} in org.xml.sax.helpers.!AttributesImpl.removeAttribute(!AttributesImpl.java:439)
when using i18n transformer to translate attributes.
 
-This is a known bug in Xerces (2.0) and it was fixed in latest versions. So, there are two
ways of solving this problem:
+A: This is a known bug in Xerces (2.0) and it was fixed in latest versions. So, there are
two ways of solving this problem:
  *  upgrade to a newer version of Xerces if possible (this is the best solution)
  *  hack i18n transformer and comment out the 'removeAttribute()' call from translateAttributes()
 
@@ -157,28 +151,30 @@
 
 A1: I can say that I am using cocoon almost a year, yes I had such problem too. I used oracle
jdbc driver with oci8 connection. When I switched to thin connection I never could kill cocoon.
So you have to experiment, I am sure that this problem caused by some library, not whole cocoon.
Also it depends what operation system you use. Under GNU/Linux I didn't have a problem at
all.
 
- 
 A2: Define ''kill''. You should understand that by doing so you create lots of
 connections to the server and you abruptly terminate them. Server does not know this
 and can detect it when writing a response back. If response takes time and/or memory
-to process, then application might not be available or might crash because of
-=== OutOfMemory. ===
+to process, then application might not be available or might crash because of !OutOfMemory.
 
-YES YES YES A2, I understand - but don't you think its crazy that a single person can start
a DOS-Attack against Cocoon? No bandwith necessary?? There must be some problem in Cocoons
caching/pooling; I would like to know how Cocoon handles the Reload Button and the Stop Button...
+A3: I understand - but don't you think its crazy that a single person can start a DOS-Attack
against Cocoon? No bandwith necessary?? There must be some problem in Cocoons caching/pooling;
I would like to know how Cocoon handles the Reload Button and the Stop Button...
 
-A3: This sounds like a Java problem...nothing to do with Cocoon per se. I've seen exactly
this behaviour bring down a !WebLogic server. [http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_clfydoc&answerpage=solution&page=wls%2FS-10100.htm
Read this ].  Also note this was [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533777
fixed in JDK 1.4.1 (4533777) ] (bug might not be available, which is strange: if you search
for this bug number you will find duplicates of this bug, but not the bug itself).
+A4: This sounds like a Java problem...nothing to do with Cocoon per se. I've seen exactly
this behaviour bring down a !WebLogic server. [http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_clfydoc&answerpage=solution&page=wls%2FS-10100.htm
Read this ].  Also note this was [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533777
fixed in JDK 1.4.1 (4533777) ] (bug might not be available, which is strange: if you search
for this bug number you will find duplicates of this bug, but not the bug itself).
 
-===  I want to use the !DirectoryGenerator to get a xml-file which contains all files of
a certain type, for instance doc-files. This works fine by using  ==={{{<map:parameter
name="include" value=".*\.doc"/>}}} , but only in the direct directory. Subfolders with
doc-files are not shown, though the "depth"-parameter is set to more than 1. Any suggestions?
+=== DirectoryGenerator ===
 
-A: The pattern is used both for directories and files. A possible solution is "^[^.]*$ ||
\.doc$" ([http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105783318026285&w=2 posted
here by Sylvain Wallez ]), i.e. everything without any dot or ending .doc. If this matches
too much (e.g. the files in a CVS directories don't have any dot), you can use the exclude
pattern for specific file names.
+Q: I want to use the !DirectoryGenerator to get a xml-file which contains all files of a
certain type, for instance doc-files. This works fine by using {{{<map:parameter name="include"
value=".*\.doc"/>}}}, but only in the direct directory. Subfolders with doc-files are not
shown, though the "depth"-parameter is set to more than 1. Any suggestions?
+
+A: The pattern is used both for directories and files. A possible solution is {{{^[^.]*$
|| \.doc$}}} ([http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105783318026285&w=2
posted here by Sylvain Wallez ]), i.e. everything without any dot or ending .doc. If this
matches too much (e.g. the files in a CVS directories don't have any dot), you can use the
exclude pattern for specific file names.
 
 === Q: How can I make a SOAP request to a server requiring basic authentication? ===
 
+A:
 
-=== Q: How can I access an EJB on a JBoss Server via JNDI in a different VM? The call jndiContext.lookup("TheJNDIName")
with the right props produces javax.naming.!CommunicationException Root exception is java.rmi.!ServerException:
!RemoteException occurred in server thread; nested exception is: java.rmi.!UnmarshalException:
error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol:
und ===
+=== JNDI ===
 
-A: "und" - appears in directory "Dokumente und Einstellungen" (german, windows): make sure
that your webapp has no blank in its path! this is a well-known jndi bug :-)
+Q: How can I access an EJB on a JBoss Server via JNDI in a different VM? The call jndiContext.lookup("TheJNDIName")
with the right props produces javax.naming.!CommunicationException Root exception is java.rmi.!ServerException:
!RemoteException occurred in server thread; nested exception is: java.rmi.!UnmarshalException:
error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol:
und
 
+A: "und" - appears in directory "Dokumente und Einstellungen" (german, windows): make sure
that your webapp has no blank in its path! this is a well-known jndi bug :-)
 
 === Q: Why does Cocoon fail on my Mac OSX system? ===
 
@@ -187,7 +183,8 @@
 
 === Q: How do I get Cocoon to use my proxy instead of a direct connection to the internet?
 ===
 
-A: The Java VM will take care of this for you. You have to set the environment variable {{{proxyHost}}}
to your proxy host, and {{{proxyPort}}} to the port of your proxy. This can be done in your
OS's "environment variable" settings, or at JVM launch with {{{-D}}} arguments (like {{{java.exe
-DproxyHost=xxx -DproxyPort=yyy}}}). For example, on my machine, I launch Tomcat with the
line {{{C:\j2sdk1.4.1_01\bin\java.exe -DproxyHost=myProxy.mydomain.com -DproxyPort=4598 -jar
-Duser.dir="C:\Tomcat4.1" "C:\Tomcat4.1\bin\bootstrap.jar" start}}} -- TomKlaasen
+A: The Java VM will take care of this for you. You have to set the environment variable {{{proxyHost}}}
to your proxy host, and {{{proxyPort}}} to the port of your proxy. This can be done in your
OS's "environment variable" settings, or at JVM launch with {{{-D}}} arguments (like {{{java.exe
-DproxyHost=xxx -DproxyPort=yyy}}}). For example, on my machine, I launch Tomcat with the
line {{{C:\j2sdk1.4.1_01\bin\java.exe -DproxyHost=myProxy.mydomain.com -DproxyPort=4598 -jar
+-Duser.dir="C:\Tomcat4.1" "C:\Tomcat4.1\bin\bootstrap.jar" start}}} -- TomKlaasen
 
 Note that some Cocoon components also use the "http.proxyHost", "http.non!ProxyHosts" and
"http.proxyPort" system properties. I didn't test it but saw them used in the source code
of the !WebServiceProxyGenerator and SOAPHelper -- Bertrand Delacretaz
 
@@ -204,26 +201,28 @@
 (Thanks to Christopher Oliver)
 
 === Q: I get this error message "cocoon.bat: using .\build\webapp as the webapp directory
===
+
 The system cannot find the file C:\Program." I'm using Windows XP and set JAVA_HOME to c:\Program
Files\j2sdk1.4.1_01. What should I do?
 
 A: As you can see it's a problem with spaces in the path. AFAIK it is fixed with JAVA_HOME
and ANT_HOME in the latest CVS, but there are still problems if your COCOON_HOME contains
spaces.
 
-
 === Q: What does the following error message mean? I cannot figure out... ===
 
-{{{__Cocoon 2 - Internal servlet error__\\
-__type__ fatal\\
-__message__ Cocoon was not initialized.\\
-__description__ Cocoon was not initialized. Cannot proceed request.\\
-__sender__ org.apache.cocoon.servlet.CocoonServlet\\
-__source__ Cocoon servlet\\
-__request-uri__\\
-/cocoon/mypage/}}}[[BR]]
+{{{__Cocoon 2 - Internal servlet error__
+__type__ fatal
+__message__ Cocoon was not initialized.
+__description__ Cocoon was not initialized. Cannot proceed request.
+__sender__ org.apache.cocoon.servlet.CocoonServlet
+__source__ Cocoon servlet
+__request-uri__ /cocoon/mypage/}}}
+
 The problem appeared after a change in a different sub-sitemap but affects the whole Cocoon
servlet. Restarting Tomcat had no effect. Neither did a reboot (which ruined my uptime!).[[BR]]
 [[BR]]
 A: I could make it up myself. It was just a missing '''"''' in the cocoon.xconf within a
JDBC-connection.
 
-=== Q: I am using the SQL transformer to retrieve blocks of HTML from a database. (Tables
store forum messages, weblog entries, etc.) Presumably because the HTML can&rsquo;t be
trusted to be well-formed the tag delimiters are converted into &amp;lt; and &amp;gt;,
making the raw HTML show in the browser uninterpreted. Is there any way to use (X)HTML from
a database without it turning into entity soup? ===
+=== SQLTransformer ===
+
+Q: I am using the SQL transformer to retrieve blocks of HTML from a database. (Tables store
forum messages, weblog entries, etc.) Presumably because the HTML can&rsquo;t be trusted
to be well-formed the tag delimiters are converted into &amp;lt; and &amp;gt;, making
the raw HTML show in the browser uninterpreted. Is there any way to use (X)HTML from a database
without it turning into entity soup?
 
 === Q: I have defined module variables in cocoon.xconf (eg defaultsmetamodule), how do I
access these from java code? ===
 
@@ -276,21 +275,24 @@
 [[BR]]
 I am using Linux Fedora 1 and Sun JDK 1.5.0. Can I use 1.5 or do I need to use 1.4?
 
-A: To answer my own question... I unistalled 1.5 and installed 1.4. Compiled and works fine.
I suspect this is actually a problem with Ant.
+A: To answer my own question... I uninstalled 1.5 and installed 1.4. Compiled and works fine.
I suspect this is actually a problem with Ant.
 
 === Q: Flow: extending objects ===
+
 Is it possible to extend for example the form object in Flow? So that we have our own implementation
of it? If so, are there examples. 
 ps why was Flow written in javascript, and not java? Probably a stupid one:).
 
 
 === Q: I want to convert an XML file into an SVG format. ===
- All i get is always an error-message:
+
+All i get is always an error-message:
 The image "http://............/hello.svg" cannot be displayed because it contains errors.
 I tried it with all available examples, always the same. Does anybody know about that ?
 
 A: Do you serialize it to JPG or PNG? Otherwise this error can not occur. But if, it's of
course no longer SVG. The reason for the error is then invalid SVG code or even invalid XML.
The conversion to JPG or PNG fails. More details should be found in the logs.
 
 === Q: How to use Flowscript without creating sessions? ===
+
 {{{FOM_JavaScriptInterpeter}}} creates a session (if it doesn't already exist) whenever a
variable is set in the global scope. 
 
 Note that variables declared inside functions must be declared with ''var'' to be considered
locals.
@@ -320,6 +322,7 @@
 Thanks SylvainWallez for the clarification!
 
 === Q: With JXTemplates, I get an error "The TransformerHandler is not serially reusable".
===
+
 This happened to me when using an incorrect syntax to insert DOM objects into a document
using the JXTemplates generator.
 
 The correct syntax to insert DOM objects in JX documents is {{{ #{myDOMobject/*} }}}, if
you forget the slash-star (/*) you might get the above error (probably because the root of
the DOM is inserted and generates an extra startDocument SAX event).

Mime
View raw message