You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2002/08/28 08:09:00 UTC

Re: Cocoon - web environment coupling ?

Pierre-Alexandre Losson wrote:
> Hi all,
> 
> I've been using Cocoon 2 for a while not and I was wondering if any of 
> you could give a quick overview on how Cocoon tightly cocoon is coupled 
> with a web environment and where these couplings occur.
> 
> I am developping a code generation application using XML/XSL and I was 
> investigating how Cocoon could be used as the transformation pipeline 
> but I wanted to know how and if I could use it outside a web 
> environment? And if so, what are the fundamental things that should be 
> adapted or maybe even added ?

Cocoon has an o.a.cocoon.Environment package to act as an abstraction of 
the underlying environment.

o.a.cocoon.Main is our commandline starter, that sets up the comandline 
environment, creates Cocoon.java, initializes it and starts crawling by 
calling the process() method on Cocoon..

Cocoon itself is the core of Cocoon, and can be used as you say.

But since to set up Cocoon correctly you have to perform some steps that 
are not so easy to remember, very recently we have been thinking of 
creating a CocoonBean.java that would make the embedded usage in Cocoon 
easier.

Basially what you need is this Bean; you can do it quite easily from 
Main.java, and it would be well accepted as a contribution to Cocoon :-D 
<hint hint - nudge nudge> ;-)

If you have /any/ question regarding this, feel free to ask :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


cannot upload the image

Posted by ch ku <ga...@yahoo.com>.
Hi 

Please help. When I try to upgrade from cocoon 2.0.1
to 2.0.3, I am facing problem when I try to upload an
image. With cocoon 2.0.1 it works fine. 

The functionality is, when I click on browse button,
it opens the window where I can c In Image upload
page.....

4/9/2002 15:36:25: file_path =
org.apache.cocoon.components.request.multipart.FilePartFile@3cbb4b

IN save as gif C file
sh: wmftogif: not found

GflError :
<or...@3cbb4b>
=> Error to open file
hoose the image file from my directory structure and
upload the image.

I get following error.....

4/9/2002 15:45:03: file_path =
org.apache.cocoon.components.request.multipart.FilePartFile@191e4c

IN save as gif C file
sh: wmftogif: not found

GflError :
<or...@191e4c>
=> Error to open file

Can anybody help me with this ?

thanks

chinmay

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by ch ku <ga...@yahoo.com>.
Hi denis 
 
Thanks for ur help again. I have now xalan-2.2.0.jar in $TOMCAT_HOME/lib/container and it seems its a bit strict with xsl tags than xalan.jar. 
 
thanks again
chinmay 
 
 
 
 
 Denis wrote:Chinmay,


> Error is 
> 
> 
> org.apache.cocoon.ProcessingException: Exception in
> creating Transform Handler:
> org.apache.xml.utils.WrappedRuntimeException: Could
> not find variable with the name of imageId
> 

Depending on the version of Cocoon and Java you 
may have to move the xalan, xml-apis and
xerces files into the JAVA_HOME%\jre\lib\endorsed\
directory.

It should make the difference.
See details on :
http://xml.apache.org/cocoon/installing/index.html

Denis



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org



---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

Re: Cocoon - web environment coupling ?

Posted by Denis <de...@aic-info.com>.
Chinmay,

<snip/>
> Error is  
> 
> 
> org.apache.cocoon.ProcessingException: Exception in
> creating Transform Handler:
> org.apache.xml.utils.WrappedRuntimeException: Could
> not find variable with the name of imageId
> 

Depending on the version of Cocoon and Java you 
may have to move the xalan, xml-apis and
xerces files into the JAVA_HOME%\jre\lib\endorsed\
directory.

 It should make the difference.
See details on :
http://xml.apache.org/cocoon/installing/index.html

Denis



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by ch ku <ga...@yahoo.com>.
Hi Denis 

Thanks for ur help. As suggested I looked into
configuration and found there were two jars. One was
in  /$TOMCAT_HOME/lib/container/xalan.jar and there
was another one which was located in
..tomcat/webapps/cocoon/WEB-INF/xalan-2.2.0.jar I
removed the one which is in tomcat home i.e. xalan.jar
and copied xalan-2.2.0.jar to
/$TOMCAT_HOME/lib/container/
It solved that problem. But it started giving problem
for one application.Did I do something wrong ?

Error is  


org.apache.cocoon.ProcessingException: Exception in
creating Transform Handler:
org.apache.xml.utils.WrappedRuntimeException: Could
not find variable with the name of imageId


Thanks again

chinmay
--- Denis <de...@aic-info.com> wrote:
> Chinmay,
> 
> > e.g /cocoon/email_alert/EmailList, it throws
> > incremental error. But after refreshing page for
> 20 to
> >  30 times I get the webpage back and then all
> works
> > fine .
> > 
> > Can anybody help me with this ?
> > 
> 
> Seems like your system takes some time to start up!
> In fact, it may take several seconds - or minutes -
> to start up the 
> cocoon servlet. But this should happen anly the
> first time you 
> start your Tomcat engine. Check out your java
> settings and 
> preload options of cocoon to make your start up time
> as small
> as possible,
> 
> Hope this help,
> 
> Denis
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email:
> cocoon-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by Denis <de...@aic-info.com>.
Chinmay,

> e.g /cocoon/email_alert/EmailList, it throws
> incremental error. But after refreshing page for 20 to
>  30 times I get the webpage back and then all works
> fine .
> 
> Can anybody help me with this ?
> 

Seems like your system takes some time to start up!
In fact, it may take several seconds - or minutes - to start up the 
cocoon servlet. But this should happen anly the first time you 
start your Tomcat engine. Check out your java settings and 
preload options of cocoon to make your start up time as small
as possible,

Hope this help,

Denis



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by ch ku <ga...@yahoo.com>.
Hi Everybody 

I am new to this list. We have been using cocoon for
last 3 months now. Its an excellent application. I am
facing some problems though which I was not able to
understand. 

Our environment is 
apache tomcat cocoon 2.0.1. When I startup apache and
tomcat and try to access some page through cocoon 

e.g /cocoon/email_alert/EmailList, it throws
incremental error. But after refreshing page for 20 to
 30 times I get the webpage back and then all works
fine .

Can anybody help me with this ?

thanks in advance 

chinmay 


















--- Nicola Ken Barozzi <ni...@apache.org> wrote:
> 
> Pierre-Alexandre Losson wrote:
> >> But since to set up Cocoon correctly you have to
> perform some steps 
> >> that are not so easy to remember, very recently
> we have been thinking 
> >> of creating a CocoonBean.java that would make the
> embedded usage in 
> >> Cocoon easier.
> >>
> >> Basially what you need is this Bean; you can do
> it quite easily from 
> >> Main.java, and it would be well accepted as a
> contribution to Cocoon 
> >> :-D <hint hint - nudge nudge> ;-)
> > 
> > 
> > I'll gladly investigate and implement this than.
> It'll clearly take me 
> > less time than reimplementing what Cocoon already
> does very well ;)
> 
> Cool! :-D
> 
> >> If you have /any/ question regarding this, feel
> free to ask :-)
> >>
> > 
> > My first question is the following : Cocoon has
> been built with the web 
> > in mind i suppose (historically anyway), an in
> that aspect is built 
> > around a 1 entry ---> 1 output paradigm.
> > 
> > Do you think it would be easy, or stated
> differently, what could be the 
> > problematics of using Cocoon in a  n input ---> n
> output system (xml 
> > pipeline architecture where a pipeline is not a
> 1->1)
> > I suppose one can always transform a n->n
> transformation to multiple 1 
> > to 1 of course but I just wanted to get your
> opinion on this.
> 
> There are no real problems about this, just that it
> hasn't been thought 
> worthwhile IIRC.
> 
> Some committers have been against this (still IIRC),
> because it can 
> possibly create confusion and unmannageability in a
> web publishing and 
> webapp system.
> 
> But when you start using it as an embedded system,
> it becomes quite 
> clear that it needs what XSLT gives, which means
> also n outputs.
> 
> So currently we have transformers that are able to
> write to the 
> filesystem, so that you can have n outputs by
> inserting a Transformer 
> for every n-1 output you need.
> 
> Now, the main point is: what is your use-case?
> To understand the requirements it's always best to
> see real-life
> examples and the exact points where you want the
> "fork" to begin.
> 
> -- 
> Nicola Ken Barozzi                  
> nicolaken@apache.org
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
>
---------------------------------------------------------------------
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email:
> cocoon-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Pierre-Alexandre Losson wrote:
>> But since to set up Cocoon correctly you have to perform some steps 
>> that are not so easy to remember, very recently we have been thinking 
>> of creating a CocoonBean.java that would make the embedded usage in 
>> Cocoon easier.
>>
>> Basially what you need is this Bean; you can do it quite easily from 
>> Main.java, and it would be well accepted as a contribution to Cocoon 
>> :-D <hint hint - nudge nudge> ;-)
> 
> 
> I'll gladly investigate and implement this than. It'll clearly take me 
> less time than reimplementing what Cocoon already does very well ;)

Cool! :-D

>> If you have /any/ question regarding this, feel free to ask :-)
>>
> 
> My first question is the following : Cocoon has been built with the web 
> in mind i suppose (historically anyway), an in that aspect is built 
> around a 1 entry ---> 1 output paradigm.
> 
> Do you think it would be easy, or stated differently, what could be the 
> problematics of using Cocoon in a  n input ---> n output system (xml 
> pipeline architecture where a pipeline is not a 1->1)
> I suppose one can always transform a n->n transformation to multiple 1 
> to 1 of course but I just wanted to get your opinion on this.

There are no real problems about this, just that it hasn't been thought 
worthwhile IIRC.

Some committers have been against this (still IIRC), because it can 
possibly create confusion and unmannageability in a web publishing and 
webapp system.

But when you start using it as an embedded system, it becomes quite 
clear that it needs what XSLT gives, which means also n outputs.

So currently we have transformers that are able to write to the 
filesystem, so that you can have n outputs by inserting a Transformer 
for every n-1 output you need.

Now, the main point is: what is your use-case?
To understand the requirements it's always best to see real-life
examples and the exact points where you want the "fork" to begin.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Cocoon - web environment coupling ?

Posted by Pierre-Alexandre Losson <pl...@telio.be>.
> But since to set up Cocoon correctly you have to perform some steps that 
> are not so easy to remember, very recently we have been thinking of 
> creating a CocoonBean.java that would make the embedded usage in Cocoon 
> easier.
> 
> Basially what you need is this Bean; you can do it quite easily from 
> Main.java, and it would be well accepted as a contribution to Cocoon :-D 
> <hint hint - nudge nudge> ;-)

I'll gladly investigate and implement this than. It'll clearly take me 
less time than reimplementing what Cocoon already does very well ;)

> 
> If you have /any/ question regarding this, feel free to ask :-)
> 

My first question is the following : Cocoon has been built with the web 
in mind i suppose (historically anyway), an in that aspect is built 
around a 1 entry ---> 1 output paradigm.

Do you think it would be easy, or stated differently, what could be the 
problematics of using Cocoon in a  n input ---> n output system (xml 
pipeline architecture where a pipeline is not a 1->1)
I suppose one can always transform a n->n transformation to multiple 1 
to 1 of course but I just wanted to get your opinion on this.

Thxs;

pierre




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org