cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: NPE in AbstractCachingProcessingPipeline when called from a Cron job
Date Tue, 23 Dec 2008 22:34:21 GMT
Andreas Hartmann wrote:

> Hi Cocoon devs,
> 
> I'm using the current head of the Cocoon 2.1.x branch.
> 
> When calling a pipeline from a ServiceableCronJob, I'm getting the 
> following exception:
> 
> 
> Caused by: java.lang.NullPointerException
>     at java.util.Hashtable.put(Hashtable.java:396)
>     at 
> org.apache.excalibur.store.impl.MRUMemoryStore.hold(MRUMemoryStore.java:216) 
> 
>     at 
> org.apache.excalibur.store.impl.MRUMemoryStore.store(MRUMemoryStore.java:190) 
> 
>     at 
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.generateLock(AbstractCachingProcessingPipeline.java:255)

> 
> The offending lines in AbstractCachingProcessingPipeline are:
> 
>   Object lock = 
> env.getObjectModel().get(HttpEnvironment.HTTP_REQUEST_OBJECT);
>   if (lock == null){
>     lock = 
> env.getObjectModel().get(AbstractCommandLineEnvironment.CLI_REQUEST_ID);
>   }
>   try {
>       transientStore.store(lockKey, lock);
>   } catch (IOException e) {
> 
> 
> When called from the cron job, the values for both keys – 
> HTTP_REQUEST_OBJECT and CLI_REQUEST_ID – are null.
> 
> Just a random thought: Since the BackgroundEnvironment initializes the 
> CommandLineRequest, would it make sense to set the value for the 
> CLI_REQUEST_ID in the object model too?

Isn't that the same problem Thorsten had [1]?

Joerg

[1] http://marc.info/?t=121932134400001&r=1&w=4

Mime
View raw message