Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Sultan Khan
, 1 year ago
org.primefaces.model.menu.DefaultSubMenu cannot be cast to org.primefaces.model.menu.MenuItem
java.lang.ClassCastException: org.primefaces.model.menu.DefaultSubMenu cannot be cast to org.primefaces.model.menu.MenuItem	at org.primefaces.component.breadcrumb.BreadCrumbRenderer.encodeMarkup(BreadCrumbRenderer.java:42)	at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:113)	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)	at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)	at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)	at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)	at pk.gov.fbr.insys.base.IRISFilterBean.doFilter(IRISFilterBean.java:105)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)	at java.lang.Thread.run(Unknown Source)