cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SmartEdit on 1811 - NullPointerException on product details page

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes
1,121

SmartEdit is throwing NullPointerException when the ProductDetailsPage is accessed.

 giu 11, 2019 1:13:17 PM org.apache.catalina.core.StandardWrapperValve invoke
 GRAVE: Servlet.service() for servlet [DispatcherServlet] in context with path [/store] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 7 of 16. Current filter: 'com.client.storefront.filters.cms.CMSSiteFilter@22e03680'!; nested exception is java.lang.NullPointerException] with root cause
 java.lang.NullPointerException
         at de.hybris.platform.commerceservices.url.impl.DefaultProductModelUrlResolver.getKey(DefaultProductModelUrlResolver.java:80)
         at de.hybris.platform.commerceservices.url.impl.DefaultProductModelUrlResolver.getKey(DefaultProductModelUrlResolver.java:1)
         at de.hybris.platform.commerceservices.url.impl.AbstractUrlResolver.resolve(AbstractUrlResolver.java:112)
         at com.client.storefront.url.DefaultPreviewDataModelUrlResolver.resolve(DefaultPreviewDataModelUrlResolver.java:101)
         at com.client.storefront.url.DefaultPreviewDataModelUrlResolver.resolve(DefaultPreviewDataModelUrlResolver.java:1)
         at com.client.storefront.filters.cms.CMSSiteFilter.generatePreviewUrl(CMSSiteFilter.java:310)
         at com.client.storefront.filters.cms.CMSSiteFilter.processPreviewRequest(CMSSiteFilter.java:230)
         at com.client.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:105)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Issue lies in this method and easily fixable through override of DefaultProductModelUrlResolver but it seems like something that should be fixed OOTB.

 @Override
 protected String getKey(final ProductModel source)
 {
     return CACHE_KEY + "." + source.getPk().toString();
 }

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

HI ,

To resolve this issue can you please try to add a Default Preview Product at Site?

I am able to resolve this issue after this configuration.

Thanks

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes

that made the trick!!!! thanks a lot

Former Member
0 Likes

Not a problem 🙂

, Can you please try to do the same?

Answers (1)

Answers (1)

Former Member
0 Likes

, Can you solve the problem? I have the same problem

nicolabeghin
Product and Topic Expert
Product and Topic Expert
0 Likes

we started to work around the different NPE but in the end had to skip this since it seems something to be fixed in the underlying architecture. I remember there was some official info in regards to Smartedit being unable to use catalogs different than Staged/Online versions but can't find it out anymore.