cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject NPE in AbstractCachingProcessingPipeline when called from a Cron job
Date Tue, 23 Dec 2008 22:04:22 GMT
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?

Thanks a lot in advance!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


Mime
View raw message