Heute morgen habe ich in mein Büro kam und das erste, was ich sah: meine Firma Website abgestürzt. Wegen mir denke ich.java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions kann nicht auf org.primefaces.model.menu.MenuElement gegossen werden
Jetzt habe ich versucht für anderthalb Stunden, das zu beheben, aber ich habe nichts gefunden und jeder verliert seine Meinung, weil die Website nicht funktioniert und ich kann es nicht reparieren (ich bin alleine. Die Schöpfer der Website sind weg oder in den Ferien). Also ich hoffe du kannst mir helfen!
Ich bekomme diese Ausnahme, wenn ich das Dashboard.xhtml meiner Website aufrufen.
java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement
Mein Problem ist: in der ganzen Ausnahme, nirgends ist eine Datei, die ich von mir selbst gemacht. Also ich weiß wirklich nicht wo genau mein Fehler ist.
Können Sie mir helfen?
Hier sind einige zusätzliche Informationen:
Ganze Ausnahme:
SEVERE: Error Rendering View[/WEB-INF/flows/dashboard/dashboard.xhtml]
java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement
at org.primefaces.component.tieredmenu.TieredMenuRenderer.encodeElements(TieredMenuRenderer.java:97)
at org.primefaces.component.tieredmenu.TieredMenuRenderer.encodeSubmenu(TieredMenuRenderer.java:162)
at org.primefaces.component.tieredmenu.TieredMenuRenderer.encodeElements(TieredMenuRenderer.java:119)
at org.primefaces.component.tieredmenu.TieredMenuRenderer.encodeMenu(TieredMenuRenderer.java:78)
at org.primefaces.component.menubar.MenubarRenderer.encodeMarkup(MenubarRenderer.java:49)
at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:105)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
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:1779)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
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 org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
at org.springframework.faces.webflow.JsfView.render(JsfView.java:89)
at org.springframework.webflow.engine.ViewState.render(ViewState.java:296)
at org.springframework.webflow.engine.ViewState.refresh(ViewState.java:243)
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:221)
at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
ganze dashborad Datei:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core" template="../../layouts/100.xhtml">
<ui:define name="heading">
<h:outputText value="Dashboard" />
</ui:define>
<ui:define name="caption">
<p>List of all your configurations and enabled containers.</p>
</ui:define>
<ui:define name="main">
<div id="main">
<div class="page_margins">
<div class="page">
<h:form id="form">
<p:panel header="Meine Projekte" rendered="#{personManagementBean.loggedIn}">
<p:growl id="msgs" showDetail="true" />
<p:dataTable id="ownerProjects" var="p" value="#{projectManagementBean.ownerProjects}" tableStyle="width:100%" emptyMessage="Keine Projekte vorhanden">
<p:column headerText="Projektkürzel" style="width:100px">
<h:outputText value="#{p.projectId}" />
</p:column>
<p:column headerText="Domäne" style="width:80px">
<h:outputText value="#{p.domain}" />
</p:column>
<p:column headerText="Sub-Domäne" style="width:80px">
<h:outputText value="#{p.subDomain}" />
</p:column>
<p:column headerText="Beschreibung">
<h:outputText value="#{p.description}" />
</p:column>
<p:column style="width:40px">
<p:panelGrid columns="2" styleClass="no-column-borders" cellpadding="2">
<p:commandButton id="selectButton" update=":form:display" oncomplete="projectDialog.show()" icon="ui-icon-search" title="Anzeigen"
actionListener="#{projectManagementBean.loadProject(p.projectId)}">
</p:commandButton>
<p:commandButton id="editButton" update=":form:display" icon="ui-icon-pencil" title="Anpassen" oncomplete="editProjectDialog.show()"
actionListener="#{projectManagementBean.loadProject(p.projectId)}">
</p:commandButton>
</p:panelGrid>
</p:column>
</p:dataTable>
</p:panel>
<p:panel header="Meine Entwicklungsprojekte" rendered="#{personManagementBean.loggedIn}" style="margin-top:10px">
<p:dataTable id="developperProjects" var="p" value="#{projectManagementBean.developperProjects}" rendered="#{personManagementBean.loggedIn}" tableStyle="width:100%"
emptyMessage="Keine Projekte vorhanden">
<p:column headerText="Projektkürzel" style="width:100px">
<h:outputText value="#{p.projectId}" />
</p:column>
<p:column headerText="Domäne" style="width:80px">
<h:outputText value="#{p.domain}" />
</p:column>
<p:column headerText="Sub-Domäne" style="width:80px">
<h:outputText value="#{p.subDomain}" />
</p:column>
<p:column headerText="Beschreibung">
<h:outputText value="#{p.description}" />
</p:column>
<p:column style="width:40px">
<p:panelGrid columns="3" styleClass="no-column-borders" cellpadding="2">
<p:commandButton id="selectButton" update=":form:display" oncomplete="projectDialog.show()" icon="ui-icon-search" title="Anzeigen"
actionListener="#{projectManagementBean.loadProject(p.projectId)}">
</p:commandButton>
</p:panelGrid>
</p:column>
</p:dataTable>
</p:panel>
<ui:include src="./project/details.xhtml" />
<ui:include src="./project/editdetails.xhtml" />
</h:form>
</div>
</div>
</div>
</ui:define>
</ui:composition>
http://www.mkyong.com/jsf2/how-to-use-comments-in-jsf-2-0/ hier möglich sind Lösungen über Kommentare in JSF –