Florent André schrieb:
Hi Anish,

I think I have the same problem you solve :
org.apache.excalibur.source.SourceException: Cannot get input stream for
cocoon://modules/mymodule/crontest

In the component test <pipeline> I try
* modules/mymodule/crontest
* lenya/modules/mymodule/crontest
* mymodule/crontest

... but nothing work.

Can you help me ?

--- cocoon.conf ---
## cron component/trigger :
 <triggers>
        <trigger name="test-job1"
                 target="org.apache.cocoon.components.cron.CronJob/test"
                 concurrent-runs="false">
          <cron>*/2 * * * * ? *</cron>
        </trigger>
      </triggers>

##component test :
 <component role="org.apache.cocoon.components.cron.CronJob/test"
             class="org.apache.cocoon.components.cron.TestCronJob"
             logger="cron.test">
<!--    <msg>I'm here</msg>
    <sleep>23000</sleep>-->
    <pipeline>modules/mymodule/crontest</pipeline>
  </component>



--- Mymodule.xmap ---
      <map:match pattern="**/crontest/**">

The URI prefix is removed when the module sitemap is mounted. And the pipeline in the above configuration ends with "crontest". So I guess this should read

       <map:match pattern="crontest">

Does it work when you call the URI from the browser instead of the cron job?

Maybe this helps,

-- Andreas


        <map:generate src="test/source.xml"/>

        <!-- DEV DEBUG 1 BEGIN -->
        <map:call resource="log-to-file">
          <map:parameter name="fileprefix" value="CronCall"/>
        </map:call>
        <!-- DEV DEBUG 1 END -->

        <map:serialize type="xml"/>
      </map:match>

TIA & HAND


On Tue, 20 Jan 2009 17:25:50 +0530, Anish <[email protected]>
wrote:
Anish wrote:
Hi

I've applied cron scheduler to my Cocoon/Lenya Application. I'm trying to call a pipeline (which is publication specific i.e. inside publication-sitemap.xmap).

My call from scheduler reaches to the sitemap but during processing it throws :

org.apache.excalibur.source.SourceException: Cannot get input stream for cocoon://mypublication/live/mypage.xml

due to:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Although my all pipelines work fine inside the publication as I access through browser.

I'm using:

Cocoon 2.1.7
Lenya 1.2.4
Tomcat 5.5.17

Please suggest.

Vik Tara wrote:
for general scheduling tasks, take a look at the cron block API
documentation in Cocoon.
I think that's here:
http://xmlshoestring.com/samples/blocks/cron/samples

Andreas Hartmann wrote:
Hi Anish,

Anish schrieb:
I was trying to implement Cocoon Job Scheduler. Please help and
provide me documentation/information as I could hardly find relevant
documentation on that.
for general scheduling tasks, take a look at the cron block API
documentation in Cocoon.

For an example how to schedule a Lenya usecase, consult the API of the
UsecaseScheduler class and use the Publish usecase as an example.

-- Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Thanks & Regards,
Anish
Hi All

Thanks, The issue is resolved.


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to