Exception on generating sitemap

Broadleaf Commerce Discussion Forum

Moderator: jocanas

tgugnani
Newbie
Newbie
Posts: 6
Joined: Thu Sep 24, 2015 1:14 am

Exception on generating sitemap

Postby tgugnani » Fri Jan 29, 2016 2:07 am

I am using broadleaf community version (4.0.7-GA) and trying to generate sitemap file through http://rootdomain/sitemap.xml , It throws an exception on that

Code: Select all

[artifact:mvn] java.lang.ClassCastException: org.broadleafcommerce.common.sitemap.domain.SiteMapGeneratorConfigurationImpl cannot be cast to org.broadleafcommerce.core.catalog.domain.CategorySiteMapGeneratorConfiguration
[artifact:mvn]    at org.broadleafcommerce.core.catalog.service.CategorySiteMapGenerator.addSiteMapEntries(CategorySiteMapGenerator.java:66)
[artifact:mvn]    at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.generateSiteMap(SiteMapServiceImpl.java:109)
[artifact:mvn]    at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.getSiteMapFile(SiteMapServiceImpl.java:165)
[artifact:mvn]    at org.broadleafcommerce.common.sitemap.controller.BroadleafSiteMapController.retrieveSiteMapFile(BroadleafSiteMapController.java:58)
[artifact:mvn]    at com.bookokay.controller.seo.SiteMapController.retrieveSiteMapIndex(SiteMapController.java:36)
[artifact:mvn]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[artifact:mvn]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[artifact:mvn]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[artifact:mvn]    at java.lang.reflect.Method.invoke(Method.java:606)
[artifact:mvn]    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
[artifact:mvn]    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
[artifact:mvn]    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
[artifact:mvn]    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775)
[artifact:mvn]    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
[artifact:mvn]    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
[artifact:mvn]    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
[artifact:mvn]    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
[artifact:mvn]    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)


I understand the exception is because we are trying to cast superclass to a subclass in CategorySiteMapGenerator

CategorySiteMapGeneratorConfiguration categorySMGC = (CategorySiteMapGeneratorConfiguration) smgc;

Not sure if anyone else is facing this issue?

jvsrikanth
Newbie
Newbie
Posts: 2
Joined: Wed Jul 06, 2016 9:11 am

Re: Exception on generating sitemap

Postby jvsrikanth » Wed Jul 06, 2016 9:16 am

Hi, I am getting the same error when generating the SiteMap for Broadleaf 3.1.0GA. Could anyone from Broadleaf look into this. I cannot look into the implementation of the classes, no access.

Code: Select all

Jul 06, 2016 10:08:06 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet in context with path [] threw exception [Request processing failed; nested exception is java.lang.ClassCastException: org.broadleafcommerce.common.sitemap.domain.SiteMapGeneratorConfigurationImpl cannot be cast to org.broadleafcommerce.core.catalog.domain.CategorySiteMapGeneratorConfiguration] with root cause
java.lang.ClassCastException: org.broadleafcommerce.common.sitemap.domain.SiteMapGeneratorConfigurationImpl cannot be cast to org.broadleafcommerce.core.catalog.domain.CategorySiteMapGeneratorConfiguration
   at org.broadleafcommerce.core.catalog.service.CategorySiteMapGenerator.addSiteMapEntries(CategorySiteMapGenerator.java:62)
   at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.generateSiteMap(SiteMapServiceImpl.java:107)
   at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.getSiteMapFile(SiteMapServiceImpl.java:142)
   at org.broadleafcommerce.common.sitemap.controller.BroadleafSiteMapController.retrieveSiteMapFile(BroadleafSiteMapController.java:58)
   at com.eyemed.controller.seo.SiteMapController.retrieveSiteMapIndex(SiteMapController.java:36)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)
   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 

jvsrikanth
Newbie
Newbie
Posts: 2
Joined: Wed Jul 06, 2016 9:11 am

Re: Exception on generating sitemap

Postby jvsrikanth » Wed Jul 06, 2016 9:16 am

Hi, I am getting the same error when generating the SiteMap for Broadleaf 3.1.0GA. Could anyone from Broadleaf look into this. I cannot look into the implementation of the classes, no access.

Code: Select all

Jul 06, 2016 10:08:06 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet in context with path [] threw exception [Request processing failed; nested exception is java.lang.ClassCastException: org.broadleafcommerce.common.sitemap.domain.SiteMapGeneratorConfigurationImpl cannot be cast to org.broadleafcommerce.core.catalog.domain.CategorySiteMapGeneratorConfiguration] with root cause
java.lang.ClassCastException: org.broadleafcommerce.common.sitemap.domain.SiteMapGeneratorConfigurationImpl cannot be cast to org.broadleafcommerce.core.catalog.domain.CategorySiteMapGeneratorConfiguration
   at org.broadleafcommerce.core.catalog.service.CategorySiteMapGenerator.addSiteMapEntries(CategorySiteMapGenerator.java:62)
   at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.generateSiteMap(SiteMapServiceImpl.java:107)
   at org.broadleafcommerce.common.sitemap.service.SiteMapServiceImpl.getSiteMapFile(SiteMapServiceImpl.java:142)
   at org.broadleafcommerce.common.sitemap.controller.BroadleafSiteMapController.retrieveSiteMapFile(BroadleafSiteMapController.java:58)
   at com.eyemed.controller.seo.SiteMapController.retrieveSiteMapIndex(SiteMapController.java:36)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)
   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 


Return to “Broadleaf Commerce”

Who is online

Users browsing this forum: No registered users and 1 guest