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

Reply via email to