You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sy...@swisscom.com on 2002/10/28 14:02:55 UTC
Cocoon task scheduler
Hello everybody,
I'm writing application with Cocoon which include Cocoon portal, authentication, etc..
All you need when you use an application server.
But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix).
So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)??
Could I use an independant software in my server or is there a concept in Cocoon?
Thank you
Sylvain
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon task scheduler
Posted by Michael Wechner <mi...@wyona.org>.
Ivelin Ivanov wrote:
> Did you look at Quartz?
> http://quartz.sourceforge.net/
Well, we have added Quartz to Wyona, and Wyona is based on Cocoon, so
... ;-)
I also don't think it's a good idea to add another "feature" to Cocoon,
but maybe this is something for cocoon-apps. We would certainly not mind
donating it to Apache.
Another option would be the Avalon scheduler if I remember correctly.
Giacomo told me once that they used it for one of their projects.
HTH
Michael
>
>
> ----- Original Message -----
> From: <Sy...@swisscom.com>
> To: <co...@xml.apache.org>
> Sent: Monday, October 28, 2002 7:02 AM
> Subject: Cocoon task scheduler
>
>
> Hello everybody,
>
> I'm writing application with Cocoon which include Cocoon portal,
> authentication, etc..
> All you need when you use an application server.
>
> But I think about a functionnality which would be very useful on a app
> server: a scheduler (like the Cron in Unix).
>
> So my question is: what the solution with Cocoon if I want to automate and
> execute tasks without a HTTP request (for example to execute a task every
> sunday at 12 o'clock)??
> Could I use an independant software in my server or is there a concept in
> Cocoon?
>
> Thank you
> Sylvain
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon task scheduler
Posted by Ivelin Ivanov <iv...@apache.org>.
Did you look at Quartz?
http://quartz.sourceforge.net/
----- Original Message -----
From: <Sy...@swisscom.com>
To: <co...@xml.apache.org>
Sent: Monday, October 28, 2002 7:02 AM
Subject: Cocoon task scheduler
Hello everybody,
I'm writing application with Cocoon which include Cocoon portal,
authentication, etc..
All you need when you use an application server.
But I think about a functionnality which would be very useful on a app
server: a scheduler (like the Cron in Unix).
So my question is: what the solution with Cocoon if I want to automate and
execute tasks without a HTTP request (for example to execute a task every
sunday at 12 o'clock)??
Could I use an independant software in my server or is there a concept in
Cocoon?
Thank you
Sylvain
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon task scheduler
Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Monday 28 October 2002 14:02, Sylvain.Thevoz@swisscom.com wrote:
>. . .
> So my question is: what the solution with Cocoon if I want to automate and
> execute tasks without a HTTP request (for example to execute a task every
> sunday at 12 o'clock)??
>. . .
Hi Sylvain,
There were some discussions about scheduling a while ago here, see
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&w=2&r=1&s=scheduler&q=b
(threads are somewhat broken, you might need to do some hunting).
I don't remember if anyone found or created a good solution, but you might
want to track the ideas found in these discussions. There is a project named
"jcron" (http://p.clark.home.mindspring.com/jcron/), and I think Avalon has
some scheduling component too.
Personally I would recommend against adding more internal non-core
functionality to Cocoon (there's soooo much stuff in there already IMHO), but
rather doing something external, which is also more reusable.
-Bertrand
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon SQL Transformation
Posted by Bert Van Kets <be...@vankets.com>.
I can't help you with your problem, but I can tell you that I am using esql
in an XSP with this. It works flawlessly when calling multiple queries one
after the other.
Bert
At 13:26 28/10/2002 +0000, you wrote:
>Hi all,
>
>Quick question to do with the way the cocoon SQL parser copes with
>multiple SQL statements.
>There is probably a very quick fix for this but I'm tearing my hair out
>trying to find it!
>
>When inserting using and SQL statement based in XSL like so:
>
><execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('1', '2')
> </query>
></execute-query>
>
>This is fine, but when you want to add a second it wont do it!
>I have tried with a second set of <execute-query> tags, I have tried
>putting a second set of <query> tags within an <execute-query>
>
>Any Ideas?
>
>Cheers
>Tom
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
R: Cocoon SQL Transformation
Posted by Luca Morandini <sp...@ipzs.it>.
Tom,
what about adding a couple quotes around the username value ?
Something like:
insert into user_info (USERNAME) values ('<xsl:value-of
select="detail/name"/>')
Best regards,
P.S.
Mind ! Strings may contain unmatched single quotes, which greatly offend the
SQL parser, think about converting unmatched single quotes in matched ones
("'" --> "''") before sending SQL statements to the SQLTransformer.
Luca Morandini
lmorandini@ieee.org
> -----Messaggio originale-----
> Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> Inviato: lunedì 28 ottobre 2002 18.19
> A: cocoon-users@xml.apache.org
> Oggetto: RE: Cocoon SQL Transformation
>
>
> OK the actual XML that is going into the failing XSL is as follows:
>
> <user>
> <detail>
> <name>tomplace</name>
> <password>tom</password>
> <first>tom</first>
> <last>place</last>
> </detail>
> <existing-user>
> <rowset />
> </existing-user>
> </user>
>
> The fact that the existing user rowset is empty is a good thing (if it
> wasn't empty then something else happens that works!
>
> The xsl that fails is as follows:
>
> <?xml version="1.0"?>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>
> <xsl:template match="user">
>
> <page>
> <xsl:choose>
> <xsl:when test="existing-user/sql:rowset/sql:row">
> <title>Blah</title>
> </xsl:when>
> <xsl:otherwise>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into user_info (USERNAME) values (<xsl:value-of
> select="detail/name"/>)
> </query>
> </execute-query>
>
> <title>Blah 2</title>
> </xsl:otherwise>
> </xsl:choose>
> </page>
> </xsl:template>
> </xsl:stylesheet>
>
> -----Original Message-----
> From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
> Sent: 28 October 2002 15:27
> To: cocoon-users@xml.apache.org
> Subject: R: Cocoon SQL Transformation
>
> Tom,
>
> I guess your pipeline contains a couple XSLT transformations and a
> couple
> SQL ones (one for the select, one for the insert), isn't it ?
>
> If this is true, could you please send me the XML which is sent to the
> failing transformation (be it SQL or XSLT) ?
>
> I'm interested in the actual XML document going into the transformer,
> not in
> the XSL source code.
>
> Best regards,
>
> Luca Morandini
> Istituto Poligrafico e Zecca dello Stato
> lmorandini@ieee.org
> spectrum.morandini@ipzs.it
>
>
>
>
> We are protected from the virus by Norton Antivirus Corporate
> Edition
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
We are protected from the virus by Norton Antivirus Corporate Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Cocoon SQL Transformation
Posted by Tom Place <ps...@nottingham.ac.uk>.
OK the actual XML that is going into the failing XSL is as follows:
<user>
<detail>
<name>tomplace</name>
<password>tom</password>
<first>tom</first>
<last>place</last>
</detail>
<existing-user>
<rowset />
</existing-user>
</user>
The fact that the existing user rowset is empty is a good thing (if it
wasn't empty then something else happens that works!
The xsl that fails is as follows:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<xsl:template match="user">
<page>
<xsl:choose>
<xsl:when test="existing-user/sql:rowset/sql:row">
<title>Blah</title>
</xsl:when>
<xsl:otherwise>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into user_info (USERNAME) values (<xsl:value-of
select="detail/name"/>)
</query>
</execute-query>
<title>Blah 2</title>
</xsl:otherwise>
</xsl:choose>
</page>
</xsl:template>
</xsl:stylesheet>
-----Original Message-----
From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
Sent: 28 October 2002 15:27
To: cocoon-users@xml.apache.org
Subject: R: Cocoon SQL Transformation
Tom,
I guess your pipeline contains a couple XSLT transformations and a
couple
SQL ones (one for the select, one for the insert), isn't it ?
If this is true, could you please send me the XML which is sent to the
failing transformation (be it SQL or XSLT) ?
I'm interested in the actual XML document going into the transformer,
not in
the XSL source code.
Best regards,
Luca Morandini
Istituto Poligrafico e Zecca dello Stato
lmorandini@ieee.org
spectrum.morandini@ipzs.it
We are protected from the virus by Norton Antivirus Corporate
Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
R: Cocoon SQL Transformation
Posted by Luca Morandini <sp...@ipzs.it>.
Tom,
I guess your pipeline contains a couple XSLT transformations and a couple
SQL ones (one for the select, one for the insert), isn't it ?
If this is true, could you please send me the XML which is sent to the
failing transformation (be it SQL or XSLT) ?
I'm interested in the actual XML document going into the transformer, not in
the XSL source code.
Best regards,
Luca Morandini
Istituto Poligrafico e Zecca dello Stato
lmorandini@ieee.org
spectrum.morandini@ipzs.it
We are protected from the virus by Norton Antivirus Corporate Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Cocoon SQL Transformation
Posted by Tom Place <ps...@nottingham.ac.uk>.
OK the full story:
The xml file that is the generator is as follows:
<doregister/>
This is then passed through an XSL file :
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Make the request parameter available -->
<xsl:param name="username"/>
<xsl:param name="password"/>
<xsl:param name="first"/>
<xsl:param name="last"/>
<xsl:template match="doregister">
<user>
<detail>
<name><xsl:value-of select="$username"/></name>
<password><xsl:value-of select="$password"/></password>
<first><xsl:value-of select="$first"/></first>
<last><xsl:value-of select="$last"/></last>
</detail>
<existing-user>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
SELECT * from user_info where USERNAME = '<xsl:value-of
select="$username"/>'
</query>
</execute-query>
</existing-user>
</user>
</xsl:template>
</xsl:stylesheet>
After this it is then passed to the XSL that fails
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<xsl:template match="user">
<page>
<xsl:choose>
<xsl:when test="existing-user/sql:rowset/sql:row">
<title>Registration Error: Autorevs - UK Car Reviews</title>
<heading>Registration Error</heading>
<navigation>
<item>
<link>home</link>
<display>Home</display>
</item>
<item>
<link>login</link>
<display>Login</display>
</item>
<item>
<link>register</link>
<display>Register</display>
</item>
<item>
<link>about</link>
<display>About</display>
</item>
</navigation>
<main>
<item>
<title>Username Already Taken!</title>
<body>The Username you selected is already in use by another
member. Please select a different one.</body>
</item>
</main>
</xsl:when>
<xsl:otherwise>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into user_info (USER_ID, USERNAME) values ('',
'test')
</query>
</execute-query>
<title>Registration Success: Autorevs - UK Car Reviews</title>
<heading>Registration Success</heading>
<navigation>
<item>
<link>home</link>
<display>Home</display>
</item>
<item>
<link>login</link>
<display>Login</display>
</item>
<item>
<link>register</link>
<display>Register</display>
</item>
<item>
<link>about</link>
<display>About</display>
</item>
</navigation>
<main>
<item>
<title>Registration Successful!</title>
<body>Congratulations <xsl:value-of select="detail/first"/> .
Your details have now been stored by the autorevs system. Please
login!</body>
</item>
</main>
</xsl:otherwise>
</xsl:choose>
</page>
</xsl:template>
</xsl:stylesheet>
-----Original Message-----
From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
Sent: 28 October 2002 14:45
To: cocoon-users@xml.apache.org
Subject: R: Cocoon SQL Transformation
Tom,
could you post the XML document that fails ?
Best regards,
Luca Morandini
lmorandini@ieee.org
> -----Messaggio originale-----
> Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> Inviato: lunedì 28 ottobre 2002 15.38
> A: cocoon-users@xml.apache.org
> Oggetto: RE: Cocoon SQL Transformation
>
>
> I have tried it like you say however am still getting an internal
server
> error:
>
> org.apache.cocoon.ProcessingException: Exception during processing of
> file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml:
> java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.NullPointerException
>
> The page will run with the sql commented out so thats not the problem
> and the sql actually does insert into the db, but then you get the
> above!
>
> Tom
>
> -----Original Message-----
> From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
> Sent: 28 October 2002 14:06
> To: cocoon-users@xml.apache.org
> Subject: R: Cocoon SQL Transformation
>
> Tom,
>
> every "query" element should live within a separate "execute-query"
one,
> like in:
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('1', '2')
> </query>
> </execute-query>
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('2', '3')
> </query>
> </execute-query>
>
> I suppose you've already try this... then, what's the error you get ?
>
> Best regards,
>
> Luca Morandini
> lmorandini@ieee.org
>
>
> > -----Messaggio originale-----
> > Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> > Inviato: lunedì 28 ottobre 2002 14.27
> > A: cocoon-users@xml.apache.org
> > Oggetto: Cocoon SQL Transformation
> >
> >
> > Hi all,
> >
> > Quick question to do with the way the cocoon SQL parser copes with
> > multiple SQL statements.
> > There is probably a very quick fix for this but I'm tearing my hair
> out
> > trying to find it!
> >
> > When inserting using and SQL statement based in XSL like so:
> >
> > <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> > <query>
> > insert into my_table (Col1, Col2) values ('1', '2')
> > </query>
> > </execute-query>>
> > This is fine, but when you want to add a second it wont do it!
> > I have tried with a second set of <execute-query> tags, I have tried
> > putting a second set of <query> tags within an <execute-query>
> >
> > Any Ideas?
> >
> > Cheers
> > Tom
> >
> >
> >
---------------------------------------------------------------------
> > Please check that your question has not already been answered in
the
> > FAQ before posting.
<http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:
<co...@xml.apache.org>
> > For additional commands, e-mail:
<co...@xml.apache.org>
> >
>
>
> We are protected from the virus by Norton Antivirus Corporate
> Edition
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
We are protected from the virus by Norton Antivirus Corporate
Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
R: Cocoon SQL Transformation
Posted by Luca Morandini <sp...@ipzs.it>.
Tom,
could you post the XML document that fails ?
Best regards,
Luca Morandini
lmorandini@ieee.org
> -----Messaggio originale-----
> Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> Inviato: lunedì 28 ottobre 2002 15.38
> A: cocoon-users@xml.apache.org
> Oggetto: RE: Cocoon SQL Transformation
>
>
> I have tried it like you say however am still getting an internal server
> error:
>
> org.apache.cocoon.ProcessingException: Exception during processing of
> file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml:
> java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.NullPointerException
>
> The page will run with the sql commented out so thats not the problem
> and the sql actually does insert into the db, but then you get the
> above!
>
> Tom
>
> -----Original Message-----
> From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
> Sent: 28 October 2002 14:06
> To: cocoon-users@xml.apache.org
> Subject: R: Cocoon SQL Transformation
>
> Tom,
>
> every "query" element should live within a separate "execute-query" one,
> like in:
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('1', '2')
> </query>
> </execute-query>
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('2', '3')
> </query>
> </execute-query>
>
> I suppose you've already try this... then, what's the error you get ?
>
> Best regards,
>
> Luca Morandini
> lmorandini@ieee.org
>
>
> > -----Messaggio originale-----
> > Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> > Inviato: lunedì 28 ottobre 2002 14.27
> > A: cocoon-users@xml.apache.org
> > Oggetto: Cocoon SQL Transformation
> >
> >
> > Hi all,
> >
> > Quick question to do with the way the cocoon SQL parser copes with
> > multiple SQL statements.
> > There is probably a very quick fix for this but I'm tearing my hair
> out
> > trying to find it!
> >
> > When inserting using and SQL statement based in XSL like so:
> >
> > <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> > <query>
> > insert into my_table (Col1, Col2) values ('1', '2')
> > </query>
> > </execute-query>>
> > This is fine, but when you want to add a second it wont do it!
> > I have tried with a second set of <execute-query> tags, I have tried
> > putting a second set of <query> tags within an <execute-query>
> >
> > Any Ideas?
> >
> > Cheers
> > Tom
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
>
> We are protected from the virus by Norton Antivirus Corporate
> Edition
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
We are protected from the virus by Norton Antivirus Corporate Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Cocoon SQL Transformation
Posted by Tom Place <ps...@nottingham.ac.uk>.
I have tried it like you say however am still getting an internal server
error:
org.apache.cocoon.ProcessingException: Exception during processing of
file:/C:/tomcat/webapps/cocoon/autorevs/docs/doregister.xml:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NullPointerException
The page will run with the sql commented out so thats not the problem
and the sql actually does insert into the db, but then you get the
above!
Tom
-----Original Message-----
From: Luca Morandini [mailto:spectrum.morandini@ipzs.it]
Sent: 28 October 2002 14:06
To: cocoon-users@xml.apache.org
Subject: R: Cocoon SQL Transformation
Tom,
every "query" element should live within a separate "execute-query" one,
like in:
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into my_table (Col1, Col2) values ('1', '2')
</query>
</execute-query>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into my_table (Col1, Col2) values ('2', '3')
</query>
</execute-query>
I suppose you've already try this... then, what's the error you get ?
Best regards,
Luca Morandini
lmorandini@ieee.org
> -----Messaggio originale-----
> Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> Inviato: lunedì 28 ottobre 2002 14.27
> A: cocoon-users@xml.apache.org
> Oggetto: Cocoon SQL Transformation
>
>
> Hi all,
>
> Quick question to do with the way the cocoon SQL parser copes with
> multiple SQL statements.
> There is probably a very quick fix for this but I'm tearing my hair
out
> trying to find it!
>
> When inserting using and SQL statement based in XSL like so:
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('1', '2')
> </query>
> </execute-query>>
> This is fine, but when you want to add a second it wont do it!
> I have tried with a second set of <execute-query> tags, I have tried
> putting a second set of <query> tags within an <execute-query>
>
> Any Ideas?
>
> Cheers
> Tom
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
We are protected from the virus by Norton Antivirus Corporate
Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
R: Cocoon SQL Transformation
Posted by Luca Morandini <sp...@ipzs.it>.
Tom,
every "query" element should live within a separate "execute-query" one,
like in:
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into my_table (Col1, Col2) values ('1', '2')
</query>
</execute-query>
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into my_table (Col1, Col2) values ('2', '3')
</query>
</execute-query>
I suppose you've already try this... then, what's the error you get ?
Best regards,
Luca Morandini
lmorandini@ieee.org
> -----Messaggio originale-----
> Da: Tom Place [mailto:psyttrp@nottingham.ac.uk]
> Inviato: lunedì 28 ottobre 2002 14.27
> A: cocoon-users@xml.apache.org
> Oggetto: Cocoon SQL Transformation
>
>
> Hi all,
>
> Quick question to do with the way the cocoon SQL parser copes with
> multiple SQL statements.
> There is probably a very quick fix for this but I'm tearing my hair out
> trying to find it!
>
> When inserting using and SQL statement based in XSL like so:
>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query>
> insert into my_table (Col1, Col2) values ('1', '2')
> </query>
> </execute-query>>
> This is fine, but when you want to add a second it wont do it!
> I have tried with a second set of <execute-query> tags, I have tried
> putting a second set of <query> tags within an <execute-query>
>
> Any Ideas?
>
> Cheers
> Tom
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
We are protected from the virus by Norton Antivirus Corporate Edition
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Cocoon SQL Transformation
Posted by Tom Place <ps...@nottingham.ac.uk>.
Hi all,
Quick question to do with the way the cocoon SQL parser copes with
multiple SQL statements.
There is probably a very quick fix for this but I'm tearing my hair out
trying to find it!
When inserting using and SQL statement based in XSL like so:
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>
insert into my_table (Col1, Col2) values ('1', '2')
</query>
</execute-query>
This is fine, but when you want to add a second it wont do it!
I have tried with a second set of <execute-query> tags, I have tried
putting a second set of <query> tags within an <execute-query>
Any Ideas?
Cheers
Tom
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Cocoon task scheduler
Posted by Robert Ellis Parrott <pa...@fas.harvard.edu>.
How about cron and a python script, which executes a localhost HTTP query?
Python has very good support for HTTP.
I'm not convinced that Cocoon needs such a beast, when so much mature
functionality is available at the OS level.
On Mon, 28 Oct 2002 Sylvain.Thevoz@swisscom.com wrote:
> Hello everybody,
>
> I'm writing application with Cocoon which include Cocoon portal, authentication, etc..
> All you need when you use an application server.
>
> But I think about a functionnality which would be very useful on a app server: a scheduler (like the Cron in Unix).
>
> So my question is: what the solution with Cocoon if I want to automate and execute tasks without a HTTP request (for example to execute a task every sunday at 12 o'clock)??
> Could I use an independant software in my server or is there a concept in Cocoon?
>
> Thank you
> Sylvain
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>