Sunday, January 31, 2016

NPE thrown while accessing Hybris custom b2c_acc_responsive storefront


This issue seems to have plagued Hybris commerce suite right from version 5.6 to the most recent version 5.7.0.5, There have been several solutions being discussed on the hybris expert forums to workaround the issue. However, I wanted to share the official answer from SAP to workaround this error.

NPE exception while accessing custom store generated using modulegen

Steps for Reconstruction


>install.bat -r b2c_acc_responsive  
>ant all  
>ant modulegen -Dinput.module=accelerator -Dinput.name=myb2c -Dinput.package=org.myb2c  

Added following to localextensions.xml

  1. <hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>  
  2.   <extensions>  
  3.     <path dir='${HYBRIS_BIN_DIR}' />  
  4.     <extension name='mcc' />  
  5.     <extension name='backoffice' />  
  6.     <extension name='commercesearchbackoffice' />  
  7.     <extension name='commerceservicesbackoffice' />  
  8.     <extension name='solrfacetsearchbackoffice' />  
  9.     <extension name='solrserver' />  
  10.       
  11.     <!-- OOB Store -->      
  12.     <!-- https://localhost:9002/yacceleratorstorefront/electronics/en/?site=electronics -->  
  13.     <!--extension name='yacceleratorcockpits' />  
  14.     <extension name='yacceleratorinitialdata' />  
  15.     <extension name='yacceleratorstorefront' />  
  16.     <extension name='yacceleratorfulfilmentprocess'/-->  
  17.       
  18.   <!-- Custom Store -->  
  19.   <!-- https://localhost:9002/myb2cstorefront/electronics/en/?site=electronics -->  
  20.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2ccore"/>  
  21.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2cfacades"/>  
  22.   <!--extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2ctest"/-->  
  23.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2cfulfilmentprocess"/>  
  24.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2cstorefront"/>  
  25.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2cinitialdata"/>  
  26.   <extension dir="${HYBRIS_BIN_DIR}/custom/myb2c/myb2ccockpits"/>  
  27.   
  28.   
  29.     <extension name='yaddon' />  
  30.     <extension name='ycommercewebservices' />  
  31.     <extension name='electronicsstore' />  
  32.     <extension name='apparelstore' />  
  33.     <extension name='liveeditaddon' />  
  34.       <extension name='acceleratorwebservicesaddon' />  
  35.   </extensions>  
  36. </hybrisconfig>  

>install.bat -r b2c_acc_responsive  
>ant all  
>ant modulegen -Dinput.module=accelerator -Dinput.name=myb2c -Dinput.package=org.myb2c  

Navigate to

Workaround for the issue

3 properties should be added for the custom storefront in local.properties

  1. myb2cstorefront.additionalWebSpringConfigs.liveeditaddon=classpath:/liveeditaddon/web/spring/liveeditaddon-storefront-web-spring.xml  
  2. cmsPageBeforeViewHandler=org.myb2c.storefront.interceptors.beforeview.CmsPageBeforeViewHandler  
  3. uiThemeResourceBeforeViewHandler=org.myb2c.storefront.interceptors.beforeview.UiThemeResourceBeforeViewHandler  

after that, please do  'ant clean all', and restart hybris server
Navigate to

A defect has been logged with hybris to fix this issue in version 5.7, until the fix is available you may use the workaround provide by SAP to circumvent this error.

70 comments:

  1. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.

    Hadoop Training in Chennai

    ReplyDelete
  2. We should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well.
    Software Testing Training in Chennai

    ReplyDelete
  3. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.


    Digital Marketing Training in Chennai

    ReplyDelete
  4. I have been following you for a couple of months now but this is my first time commenting on a blog post. Thank you for sharing your knowledge and experience with us. Keep up the good work. Already bookmarked for future reference.

    SAP training in Chennai

    ReplyDelete
  5. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    Digital marketing company in Chennai

    ReplyDelete
  6. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.

    SEO Company in Chennai

    ReplyDelete
  7. I simply couldn’t depart your site before suggesting that I really enjoyed the usual information an individual supply in your visitors? Is going to be again steadily to check out new posts.

    Digital marketing company in Chennai

    ReplyDelete
  8. Great and really helpful article! Adding to the conversation, providing more information, or expressing a new point of view...Nice information and updates. Really i like it and everyday am visiting your site..

    Digital marketing company in Chennai

    ReplyDelete


  9. Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.


    SEO Company in Chennai

    ReplyDelete
  10. Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.


    SEO Company in Chennai

    ReplyDelete
  11. Excellent incredible blog layout! How long have you been blogging for? you make running a blog look easy. The overall glance of your website is magnificent, let alone the content!

    Digital marketing company in Chennai

    ReplyDelete


  12. Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.


    SEO Company in Chennai

    ReplyDelete
  13. I truly appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thanks again! Keep update more excellent posts..

    Digital marketing company in Chennai

    ReplyDelete
  14. Excellent incredible blog layout! How long have you been blogging for? you make running a blog look easy. The overall glance of your website is magnificent, let alone the content!

    Linux Training in Chennai Mylapore

    ReplyDelete
  15. Thanks for appreciating. Really means and inspires a lot to hear from you guys.I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..Believe me, This is very helpful for me.

    Online Training in Chennai

    ReplyDelete
  16. I have definitely picked up anything new from right here. I did however expertise a few technical points using this site, since I experienced to reload the web site a lot of times previous to I could get it to load correctly.

    Online Training in Chennai

    ReplyDelete
  17. the site contains a very great article. the information present in this site will be very useful for us. thank you for sharing the blog with us.
    ROI Services in Chennai

    ReplyDelete
  18. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care.As always, we appreciate you confidence and trust in us.

    Email Marketing Chennai

    ReplyDelete
  19. Thank you for this brief explanation and ver nice information. well, got a good knowledge. Have a nice idea, this is more helpful to me. This can gives the better performance.
    PPC Services Chennai

    ReplyDelete
  20. this post is much helpful for us. this is really very massive value to all the readers and it will be the only reason for the post to get popular with great authority.
    ROI Services in Chennai

    ReplyDelete
  21. Really nice and definitely it will be useful for many people. Kindly keep update like this.

    Digital Marketing For Small Business in Chennai

    ReplyDelete
  22. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article.
    Email Marketing Chennai

    ReplyDelete
  23. Thanks you for sharing the unique content. you have done a great job. thank you for sharing such a unique content.
    Email Marketing Chennai

    ReplyDelete
  24. Got a creative information. Understand well in this. This gives the easy technique of experiment. New technologies are developed more. so techniques are also improved. Thank you for this information.
    SMO Services in Chennai

    ReplyDelete
  25. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

    Digital Marketing Company in Chennai

    Digital Marketing Services in Chennai

    ReplyDelete
  26. Your content is awesome . You have done a great job and its very useful for me . I appreciate your effort and I hope that you will get more positive comments from the web users.
    Branding Services in Chennai

    ReplyDelete
  27. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me

    Content marketing services in chennai

    ReplyDelete
  28. nice blog too informative. looking and reading your points its so impressive. doing more blog like this. i really appreciated doing like this.
    Java Training in Chennai

    ReplyDelete
  29. Great explanation to given on this post .The given information very impressed for me really so nice content.
    Really very nice blog information for this one and more technical skills are improve,i like that kind of post.


    Dot Net training in chennai

    ReplyDelete
  30. Got a creative information. Understand well in this. This gives the easy technique of experiment. New technologies are developed more. so techniques are also improved. Thank you for this information.
    Digital Marketing Company in Chennai

    ReplyDelete
  31. Great information shared in this blog. Helps in gaining concepts about new information and concepts.Awsome information provided.Very useful for the beginners.
    SEO Training in Chennai

    ReplyDelete
  32. This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.
    Your final conclusion was good.


    Informatica Training in Chennai

    ReplyDelete
  33. My friends, I am more than happy to uncover your site. It is quite interesting and informative. I found a lot of interesting things here, especially for discussion. Your site inspired me on hard work. I am hoping the same helpful works from you in future. Do not hesitate to use www.custom-paper-writing.org for all new posts to be sure in their brilliant quality at any suitable time!

    ReplyDelete
  34. wow amazing post.The key points you mentioned here related to maintenance of car is really awesome.Checking all fluid levels,changing oil and of course the regular service of the car which is necessary to maintain our vehicle.Thank you for the information.

    bike spa services in mumbai

    ReplyDelete
  35. amazing and useful post. This idea is awesome and the good source of information.keep up the great work
    Web Design Company Bangalore | Software Development Company in Bangalore

    ReplyDelete
  36. Well explained. Got to learn new things from your Blog on Appium.Appium training in chennai

    ReplyDelete

  37. thanks for the information it will one of the good blog, i need more news from this topic.
    Back to original

    ReplyDelete
  38. Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
    seo company in india
    digital marketing company in india
    seo company in chennai
    digital marketing company in chennai

    ReplyDelete
  39. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.

    seo company in india

    ReplyDelete
  40. This comment has been removed by the author.

    ReplyDelete
  41. It’s Really Very helpful information for me and my friends. I have added my best blog list. All are saying the same thing repeatedly, but in your blog post I had a chance to get individual and some useful information. I love your writing style very much. I really appreciate your blog post. Keep on blogging!!
    Engineering Colleges in Chennai, Mechanical Engineering Colleges in Chennai

    ReplyDelete
  42. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information


    Bangalore Web Designing Company, Web Development Company Bangalore

    ReplyDelete
  43. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care.As always, we appreciate you confidence and trust in us.

    Base SAS Training in Chennai

    ReplyDelete
  44. wow really superb you had posted one nice information through this. Definitely it will be useful for many people. So please keep update like this.

    Laser Root Canal Treatment In Chennai

    Best Dental Clinic In Velachery

    ReplyDelete
  45. I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon.

    Digital Marketing Company in Chennai

    ReplyDelete
  46. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Web Development Company in India

    ReplyDelete
  47. Such a great articles in my carrier, It's wonderful commands like easiest understand words of knowledge in information's.
    Digital Marketing Company in India

    ReplyDelete
  48. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.
    Facility Management Companies in Chennai

    ReplyDelete
  49. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information

    Bangalore Web Designing Company, UI Designing Company Bangalore

    ReplyDelete
  50. This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good. We are sowing seeds and need to be patiently wait till it blossoms.
    Office Interior Designers in Coimbatore
    Office Interior Designers in Bangalore
    Office Interior Designers in Hyderabad

    ReplyDelete
  51. Thanks for appreciating. Really means and inspires a lot to hear from you guys.I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..Believe me, This is very helpful for me.
    Home Interiors in Chennai

    ReplyDelete
  52. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

    Android App Development Company

    ReplyDelete
  53. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    PHP training in chennai

    ReplyDelete

  54. Its very useful to me. Wonderful blog.. Thanks for sharing informative Post.

    Installment loans
    Payday loans
    Title loans

    ReplyDelete
  55. EtsyTeleMart.com Is The Largest Store For Online Shopping In Pakistan To Provide Thousands Of Products At One Stop Like Health Products, Fitness Products,Beauty Products,Homeware Products, Kitchenware Products,Men Products ,Women Products And Much More
    Shop Now !!!!!!!!
    http://www.etsytelemart.com/

    ReplyDelete
  56. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    iOS App Development Company

    ReplyDelete
  57. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

    Fitness SMS
    Fitness Text
    Salon SMS
    Salon Text
    Investor Relation SMS
    Investor Relation Text

    ReplyDelete

  58. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

    Personal Installment Loans
    Title Car loan
    Cash Advance Loan

    ReplyDelete
  59. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.


    Pawn Shop

    Pawn Loans

    Pawn Shops

    Pawn Loan

    Pawn Shop near me

    ReplyDelete
  60. The most vital thing is association. There ought to be common assent in each choice you take to stay away from issues. Other than being sorted out, understudies should know about their duties, be quiet, innovative and supportive to their kindred individuals.Buy Dissertation

    ReplyDelete
  61. Thanks for spending your valuable time in delivering the most valuable content here.I loved the way you write and suggest my friends too for getting aware of your blogs.
    Pawn Shops in Montgomery
    Pawn Shops in Birmingham
    Pawn Shops in Mobile

    ReplyDelete


  62. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

    Installment Loans Near Me
    Title loans Near Me
    Cash Advances Near Me

    ReplyDelete
  63. I think like I get a clear cut understanding while reading the content than anywhere else. Keep continuing this journey...!

    Pawn Shops in Montgomery

    Pawn Shops in Birmingham

    Pawn Shops in Mobile

    ReplyDelete
  64. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

    ReplyDelete
  65. Just read your website. Good one. I liked it. Keep going. you are a best writer your site is very useful and informative

    thanks for sharing!
    android development company in Chennai

    ReplyDelete