You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Upayavira <uv...@upaya.co.uk> on 2003/11/07 13:42:01 UTC

Re: Cocoon Ant Task

David Crossley wrote:

>Upayavira wrote:
>  
>
>>I'm stumped. Can you have a look in the Cocoon source, and make sure 
>>you've got o.a.c.bean.helpers.AntDelegate.java present?
>>
>>But I don't think that's it.
>>    
>>
>
>Yes, it is present.
>
>  
>
>>What version of Ant are you using?
>>    
>>
>
>ant -version
>Apache Ant version 1.5 compiled on July 9 2002
>
>Just now installed 1.6beta2 and i get other problems.
>
>I have other comments, but i am going to hold them back for
>a while. I am wondering if my problems are causing other people
>to not bother trying to run this same test.
>
>--David
>
>  
>
David,

I've just done fixed one problem (not yours) and then done a clean 
checkout, and run my Ant task against it, and it has worked fine.

Any chance you could have another go? It'd be great to get this Ant task 
into active service within Forrest.

Anyone else - please try out this CocoonTask, as I believe it will allow 
you to configure Forrest from within the build file, thus removing the 
need for a cli.xconf file.

Regards, Upayavira



Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
Upayavira wrote:
> David,
> 
> I've just done fixed one problem (not yours) and then done a clean 
> checkout, and run my Ant task against it, and it has worked fine.
> 
> Any chance you could have another go? It'd be great to get this Ant task 
> into active service within Forrest.

Sure.

No, i still get the same problems as i have reported.

> Anyone else - please try out this CocoonTask, as I believe it will allow 
> you to configure Forrest from within the build file, thus removing the 
> need for a cli.xconf file.

Mmmm, no response still, eh.

Upayavira, as i said before, it may be better to ask on cocoon-dev to
gain a wider audience. Here is an idea. Add it to Cocoon's Bugzilla
describing what people need to do, and provide an example build.xml
as an attachment. There is also the 'cocoon.sh cli' that they need to
be asked to run.

This is too important. We have got to think of ways to gain attention.

--David



Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
Antonio Gallardo wrote:
> David Crossley dijo:
> > I am pleased to say that the problems that i reported,
> > using the configuration earlier in this forrest-dev thread,
> > have now gone away (using yesterday's Cocoon cvs and ant-1.6beta2).
> 
> Hi David:
> 
> ?? What it means?
> 
> Was introduced a bug with upgrade to Ant 1.6? I have concerns about this.
> Please answer.

Sorry to confuse you Antonio. As Upayavira has explained, all is well
with the Cocoon Ant task for me. My mention of ant-1.6beta2 was because
that is what i still have on my operating system (not yet upgraded).

--David



Re: Cocoon Ant Task

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Upayavira dijo:
> No. This discussion is about a Cocoon Ant task to replace the <java>
> task in Forrest's Ant build file.
>
> When David tried out this Ant task some while ago, he couldn't get it to
> work. He has now tried it, and found that it does work, so there is
> nothing to worry about.

TY Upayavira, it is clear to me now. :-D

Best Regards,

Antonio Gallardo


Re: Cocoon Ant Task

Posted by Upayavira <uv...@upaya.co.uk>.
Antonio Gallardo wrote:

>David Crossley dijo:
>  
>
>>I am pleased to say that the problems that i reported,
>>using the configuration earlier in this thread, have now
>>gone away (using yesterday's Cocoon cvs and ant-1.6beta2).
>>    
>>
>
>Hi David:
>
>?? What it means?
>
>Was introduced a bug with upgrade to Ant 1.6? I have concerns about this.
>Please answer.
>  
>
No. This discussion is about a Cocoon Ant task to replace the <java> 
task in Forrest's Ant build file.

When David tried out this Ant task some while ago, he couldn't get it to 
work. He has now tried it, and found that it does work, so there is 
nothing to worry about.

Regards, Upayavira



Re: Cocoon Ant Task

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
David Crossley dijo:
> I am pleased to say that the problems that i reported,
> using the configuration earlier in this thread, have now
> gone away (using yesterday's Cocoon cvs and ant-1.6beta2).

Hi David:

?? What it means?

Was introduced a bug with upgrade to Ant 1.6? I have concerns about this.
Please answer.

Best Regards,

Antonio Gallardo


Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
I am pleased to say that the problems that i reported,
using the configuration earlier in this thread, have now
gone away (using yesterday's Cocoon cvs and ant-1.6beta2).

--David


Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
Upayavira wrote:
> Away from my own pc at present - I'll just answer your last problem - put
> servlet.jar into your web-inf/lib and it'll work. I'll answer more fully
> later.

Okay, i found a few copies of servlet.jar in the Cocoon dist :-(
I copied the one from scratchpad blocks.

Now i do get a bit further, but many messages from deli and
at the end a clue about configuration problems...
------
Caused by: org.apache.cocoon.ProcessingException:
Please, specify at least one starting URI.
        at
org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:137)
------

I tracked the problem to a parser failure when reading cli.xconf
Cocoon's file has "----" embedded in xml comments ... gotcha!

Now my CLI is humming along, building Cocoon docs.


However, the Ant task still has the problem with not finding 
AntDelegate.process()

--David



Re: Cocoon Ant Task

Posted by Upayavira <uv...@upaya.co.uk>.
Away from my own pc at present - I'll just answer your last problem - put
servlet.jar into your web-inf/lib and it'll work. I'll answer more fully
later.

Upayavira
On 10 Nov 2003 01:05:38 +1100, "David Crossley"
<cr...@indexgeo.com.au> said:
> I put some debug statements into CocoonWrappper.java to see why
> it could not find the config file.
> ----------
> cd $COCOON_HOME
> ./cocoon.sh cli
> ...
> configFile is null
> So try ./webapp/cocoon.xconf
> No, so try ./webapp/WEB-INF/cocoon.xconf
> ----------
> 
> It seems to get the context as "./webapp" and so cannot find
> the config. I hacked it so that it became "build/webapp" and
> we now get past that hurdle.
> 
> But having the wrong context must cause other troubles.
> I notice that two new directories get incorrectly created in
> $COCOON_HOME (./webapp and ./work) which should actually be
> in $COCOON_HOME/build
> 
> Then it goes on to give this  ...
> 
> ----------
> ...
> 
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at Loader.invokeMain(Unknown Source)
>         at Loader.run(Unknown Source)
>         at Loader.main(Unknown Source)
> Caused by: java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpSessionBindingListener
>         at java.lang.ClassLoader.defineClass0(Native Method)
> ...
> ----------
> 

Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
I put some debug statements into CocoonWrappper.java to see why
it could not find the config file.
----------
cd $COCOON_HOME
./cocoon.sh cli
...
configFile is null
So try ./webapp/cocoon.xconf
No, so try ./webapp/WEB-INF/cocoon.xconf
----------

It seems to get the context as "./webapp" and so cannot find
the config. I hacked it so that it became "build/webapp" and
we now get past that hurdle.

But having the wrong context must cause other troubles.
I notice that two new directories get incorrectly created in
$COCOON_HOME (./webapp and ./work) which should actually be
in $COCOON_HOME/build

Then it goes on to give this  ...

----------
...

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpSessionBindingListener
        at java.lang.ClassLoader.defineClass0(Native Method)
...
----------


Re: Cocoon Ant Task

Posted by David Crossley <cr...@indexgeo.com.au>.
I have found a clue. When i try to run the Cocoon CLI directly
it has problems finding the config file. (Getting my hands dirty
with the code now.)

cd $COCOON_HOME
./cocoon.sh cli

----------
...
ERROR   2003-11-09 23:06:45.793 [        ] (): Could not find the
configuration
file.
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at Loader.invokeMain(Unknown Source)
        at Loader.run(Unknown Source)
        at Loader.main(Unknown Source)
Caused by: java.io.FileNotFoundException: The configuration file could
not be found.
        at
org.apache.cocoon.bean.CocoonWrapper.getConfigurationFile(CocoonWrapper.java:236)
        at
org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:142)
        at
org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:132)
        at org.apache.cocoon.Main.main(Main.java:349)
        ... 7 more
----------