Simon Mieth wrote:

On Wed, 31 Mar 2004 16:33:36 -0500
"Corey Keith" <[EMAIL PROTECTED]> wrote:



I'm trying to use the CocoonTask from ant and when I
include the load-class element in the cocoon target I get
the following error. Below is my build.xml.

BUILD FAILED
C:\vets\build.xml:10: Class
org.apache.cocoon.CocoonTask$ElementWrapper doesn't
support nested text data.

Is this a bug or should I be loading database driver
classes differently with ant?

Thanks,
Corey

<project default="generate" basedir=".">
<property name="cocoon.context"
value="/cocoon-2.1.4/build/webapp"/><path
id="cocoon.classpath">
 <dirset dir="${cocoon.context}/WEB-INF/classes"/>
 <fileset dir="${cocoon.context}/WEB-INF/lib"
 includes="*.jar"/>
</path>
<taskdef name="cocoon"
classname="org.apache.cocoon.CocoonTask"
classpathref="cocoon.classpath"/>
<target name="generate">
 <cocoon verbose="true" classpathref="cocoon.classpath"
follow-links="true" precompile-only="false"
confirm-extensions="false" context-dir="${cocoon.context}"
config-file="WEB-INF/cocoon.xconf" work-dir="build/work"
dest-dir="build/dest" default-filename="hello.html"
accept="*/*">
  <broken-links type="xml" file="brokenlinks.xml"
  generate="false"
extension=".err"/>
  <load-class>sun.jdbc.odbc.JdbcOdbcDriver</load-class>
  <logging
  log-kit="${cocoon.context}/WEB-INF/logkit.xconf"
logger="cli" level="DEBUG"/>
  <uris name="vets" follow-links="true">
   <uri type="append" src-prefix="vets/"
   src="vetslist.html"
dest="C:\mets"/>
  </uris>
 </cocoon>
</target>
</project>




Hi,


the CocoonTask doesnt support text-nodes like load-class,
you have to add this to cocoon-task element as attribute.
like:
<cocoon ...
    load-class="   ">

           ....
</cocoon>

But unfortunalety it is impossible to use then more
load-class-elements in this way, or is there a another way? Or must this add to the CocoonTask with "NestedElement" for
load-class and other (Upayavira? ;-))?


Hi Simon!

No, in this way it doesn't support multiple classes. We could either use:

<cocoon load-class="class, class"> or <load-class class="xxx"/>

Either would do it. Fancy making a patch?

I don't use databases with Cocoon, and thus have never used nor tested this load-class functionality (but I added it because I saw that there would be a need). If someone can tell me whether or not it works, I'd really apprecaite that!

Regards, Upayavira


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to