cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: The cocoon protocol can not be used outside an environment.
Date Tue, 08 Feb 2011 23:05:13 GMT
Is the <trigger> section enclosed in the following component declaration?

<component 
class="org.apache.cocoon.components.cron.CocoonQuartzJobScheduler"
         role="org.apache.cocoon.components.cron.JobScheduler">

The CocoonQuartzJobScheduler is important, since this class is the one 
setting up the environment that is reported to be missing in your stack 
trace.

Sylvain


Le 06/02/11 10:07, pankaj gajjar a écrit :
> Hello Cocoon Users,
>
> I am facing one issue with integration of cocoon pipeline and 
> CocoonPipelineCronJob scheduler.
>
> My cocoon.xconf snap code as below
> ...
> <trigger name="pipeline-writetest"
> target="org.apache.cocoon.components.cron.CronJob/writetimecron"
> concurrent-runs="false">
> <cron>10 * * ? * *</cron>
> </trigger>
> </triggers>
> <component role="org.apache.cocoon.components.cron.CronJob/writetimecron"
> class="org.apache.cocoon.components.cron.CocoonPipelineCronJob"
> logger="cron.writetimecron">
> <sleep>10</sleep>
> <pipeline>writetime</pipeline>
> </component>
> and my pipeline configure in sitemap.xmap as below
> <map:pipeline internal-only="false">
> <map:match pattern="writetime">
> .....<!-- all generator,transformer and serialier code ..-->
> </map:match>
> </map:pipeline>
>
> > Information Tomcat:
> > apache-tomcat-6.0.30 Cocoon : 2.1 and
> > my pipeline is working well if i
> > accessing it externally ..
>
> **but if i am calling this pipeline from my cronjob then i am getting 
> below error in cocoon.log**
> INFO  (2011-02-06) 12:54.10:018 [cron] (Unknown-URI) 
> Unknown-Thread/QuartzJobExecutor: Executing cron job named 
> 'pipeline-writetest'
> ERROR (2011-02-06) 12:54.10:019 [cron] (Unknown-URI) 
> Unknown-Thread/QuartzJobExecutor: Cron job name 'pipeline-writetest' died.
> java.net.MalformedURLException: The cocoon protocol can not be used 
> outside an environment.
> at 
> org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:119)
> at 
> org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:65)
> at 
> org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
> at 
> org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558)
> at 
> org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541)
> at 
> org.apache.cocoon.components.cron.CocoonPipelineCronJob.execute(CocoonPipelineCronJob.java:68)
> 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:597)
> at 
> org.apache.avalon.excalibur.component.ComponentProxyGenerator$ComponentInvocationHandler.invoke(ComponentProxyGenerator.java:143)
> at $Proxy6.execute(Unknown Source)
> at 
> org.apache.cocoon.components.cron.QuartzJobExecutor.execute(QuartzJobExecutor.java:103)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
> Source)
> at java.lang.Thread.run(Thread.java:662)
>
> Please do let me know if you face same issue ago or you are knowing 
> solution of this .
>
> Regards
> Pankaj


-- 
Sylvain Wallez - http://bluxte.net



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


Mime
View raw message