I want to use <sec:authorize access> in topbar.xhtml,
but it gets exception like below.
When I delete <sec:authorize> part, it works !!
I was using spark, <ps:menu> and it was working well.

Exception:
java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement
at org.primefaces.apollo.component.menu.ApolloMenuRenderer.encodeElements(ApolloMenuRenderer.java:51)
at org.primefaces.apollo.component.menu.ApolloMenuRenderer.encodeMarkup(ApolloMenuRenderer.java:41)
at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:114)

The problem was about "<param-name>javax.faces.FACELETS_LIBRARIES</param-name>" definition in web.xml.
It was like this:
<param-value>/WEB-INF/springsecurity.taglib.xml
/WEB-INF/primefaces-apollo.taglib.xml
</param-value>

I have changed it:
<param-value>/WEB-INF/springsecurity.taglib.xml;/WEB-INF/primefaces-apollo.taglib.xml
</param-value>