Hi Gary, There are a number of missing links in your mail but I would guess that the NPE is caused because in MLDocGenerator you have something like
try { ... source = resolver.resolveURI(src); } catch(Exception ex) { // ignore } } public void recycle() { resolver.release(source); // source == null here when exception } You have to propagate exception out of setup / generate. Otherwise the container try to recycle and returns it to the component pool. HTH, Alfred. From: Gary Larsen [mailto:gary.lar...@envisn.com] Sent: Mittwoch, 14. September 2011 21:23 To: users@cocoon.apache.org Subject: Enviroment missing in cron class? I'm attempting something new for me in Cocoon 2.1.9 and would appreciate some advice. Basically it's a cron class which not seem to have complete access to the Cocoon environment. The class extends ServiceableCronJob and runs this code to execute the pipeline request: resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); resolver.resolveURI(sb.toString()); This returns a result but does not include parts of the aggregation, it just returns the result of the XSL transformation without data. <map:part src="cocoon:/doc/db/{1}/params/{2}"/> <map:part src="context:/appdata/data-query/{1}/{2}"/> When I run the request with a browser the pipeline works ok. Another symptom is a couple of exceptions: org.apache.cocoon.ProcessingException: Unable to remove component from automatic release: no environment available. at org.apache.cocoon.components.CocoonComponentManager.removeFromAutomaticRelease(CocoonComponentManager.java:489) . java.lang.NullPointerException at org.apache.cocoon.environment.AbstractEnvironment.release(AbstractEnv ironment.java:560) at org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.releas e(MutableEnvironmentFacade.java:313) at com.envisn.nv.serialize.MLDocGenerator.recycle(MLDocGenerator.java:10 9) Thanks for any suggestions, gary The content of this e-mail is intended only for the confidential use of the person addressed. If you are not the intended recipient, please notify the sender and delete this e-mail immediately. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org