Blog from an ATG Developer

May 24, 2010

Pipeline Error

Filed under: ATG,Eclipse — madhulal @ 12:51 am

I was trying to add new link to one of the chains inmcommerce pipeline.
I created a properties file for the component(link), then added a java file by implementing the PipelineProcessor. Added the new link in the commercepipeline.xml in the the required space. I did a build and restarted my jboss server. while starting up the server, I was seeing an error in the console about the pipeline issue. I was getting the following error.

19:31:51,750 INFO [PipelineManager] Starting PipelineManager.
19:31:52,390 INFO [STDOUT] **** Error
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] 1274661112390
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] /
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Unable to resolve component /atg/commerce/PipelineManager
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] java.lang.NullPointerException
19:31:52,390 INFO [STDOUT] **** Error
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] 1274661112390
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] /
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] at atg.service.pipeline.PipelineBuilder.build(PipelineBuilder.java:284)

19:31:52,390 INFO [STDOUT] **** Error
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] 1274661112390
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] /
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] at atg.service.pipeline.PipelineManager.createFromXML(PipelineManager.java:352)

19:31:52,390 INFO [STDOUT] **** Error
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] 1274661112390
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] /
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] at atg.service.pipeline.PipelineManager.doStartService(PipelineManager.java:273)

19:31:52,390 INFO [STDOUT] **** Error
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] 1274661112390
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] /
19:31:52,390 INFO [STDOUT]
19:31:52,390 INFO [STDOUT] at atg.nucleus.GenericService.startService(GenericService.java:496)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] at atg.nucleus.NucleusNameResolver.startService(NucleusNameResolver.java:1371)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] at atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1133)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:787)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:569)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] at atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:550)

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] ….stack trace CROPPED after 10 lines.

19:31:52,406 INFO [STDOUT] **** Error
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] 1274661112390
19:31:52,406 INFO [STDOUT]
19:31:52,406 INFO [STDOUT] /
19:31:52,406 INFO [STDOUT]
19:31:52,484 INFO [ItemPricingEngine] Pricing Engine starting up
19:31:52,546 INFO [STDOUT] **** Error
19:31:52,546 INFO [STDOUT]
19:31:52,546 INFO [STDOUT] Sun May 23 19:31:52 CDT 2010
19:31:52,546 INFO [STDOUT]
19:31:52,546 INFO [STDOUT] 1274661112546
19:31:52,546 INFO [STDOUT]
19:31:52,546 INFO [STDOUT] /
19:31:52,546 INFO [STDOUT]
19:31:52,546 INFO [STDOUT] Unable to set configured property “/atg/commerce/order/OrderTools.pipelineManager” atg.nucleus.ConfigurationException: Unable to resolve component /atg/commerce/PipelineManager

I could not understand the problem. I was concentrating more at the xml expecting some typos or some “xml-combine” issues. I had many unsuccessful attempts to rectify the problem. Finally I wanted to check the java file. I used Eclipse’s new class wizard to create the new class for the pipleline “link” component. In the wizard we can specify the interfaces and super class from which the new class implements and extends respectively. We have to implement two of the methods in order to extend the “PipelineProcessor” interface.
1. getRetCodes()
2. runProcess(Object arg0, PipelineResult arg1)

So by default, Eclipse gave me a default method body for these two methods and my getRetCodes() method looked like the following.

public int[] getRetCodes() {
return null;
}

I changed the method to the following.

public int[] getRetCodes() {
int[] ret = { 1 };
return ret;
}

Surprisingly that solved the issue. I was fuming my eyes and brain on this issue for quite some time. So please make sure that you give proper implementation to the overriding methods.I hope somebody would benefit from this post.

Cheers.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment