Re: struts-menu problem with appfuse spring mvc
"Matt Raible" <[email protected]> Thu, 2 Nov 2006 13:05:06 -0700
| Newsgroups | gmane.comp.java.struts-menu.user |
|---|---|
| Message-ID | <[email protected]> |
It looks like your menu-config.xml may be invalid XML. Can you validate it in Internet Explorer or something like that? Matt On 11/2/06, dylan schleppe <[email protected]> wrote: > Hi Folks, > I've just recently upgraded my app( which I built with appfuse 1.9..1) > to 1.9.4 I'm using spring mvc. > A while back I got rid of struts-menu and now I'd like to add it back. > Unfortunately I've run into an issue that others have had but the > same solution doesn't seem to work. > I get the following error on startup: > BTW, commons-lang is in my path. > > > javax.servlet.ServletException: Failure initializing struts-menu: > Error parsing resource file: /WEB-INF/menu-config.xml nested exception > is: The markup in the document following the root element must be > well-formed. > at net.sf.navigator.menu.MenuLoader.initApplicationContext(MenuLoader.java:63) > at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) > at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:86) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:297) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1025) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420) > at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245) > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156) > at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290) > at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348) > at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156) > at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) > at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) > at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) > at carma.webapp.listener.StartupListener.contextInitialized(StartupListener.java:63) > ..... > > The menu-config is as follows: > <?xml version="1.0" encoding="UTF-8"?> > <MenuConfig> > <Displayers> > <Displayer name="Velocity" > type="net.sf.navigator.displayer.VelocityMenuDisplayer"/> > <Displayer name="TabbedMenu" > type="net.sf.navigator.displayer.TabbedMenuDisplayer"/> > </Displayers> > <Menus> > <Menu name="MainMenu" title="mainMenu.title" page="/mainMenu.html"/> > <Menu name="UserMenu" title="menu.user" description="User > Menu" page="/editProfile.html" roles="admin,user"/> > <Menu name="FileUpload" title="menu.selectFile" > description="File Upload" width="100" page="/selectFile.html" > roles="admin,user"/> > <Menu name="AdminMenu" title="menu.admin" description="Admin > Menu" roles="admin" width="120" page="/users.html"> > <Item name="ViewUsers" title="menu.admin.users" page="/users.html"/> > <Item name="ActiveUsers" title="mainMenu.activeUsers" > page="/activeUsers.html"/> > <Item name="ReloadContext" title="menu.admin.reload" > page="/reload.html"/> > <Item name="FlushCache" title="menu.flushCache" > page="/flushCache.html"/> > <Item name="Clickstream" title="menu.clickstream" > page="/clickstreams.jsp"/> > </Menu> > <Menu name="Logout" title="user.logout" page="/logout.jsp" > roles="admin,user"/> > </Menus> > </MenuConfig> > > I've got this in my action-servlet.xml > <bean id="menu" class="net.sf.navigator.menu.MenuLoader"/> > > the menu.jsp is as follows: > <%@ include file="/common/taglibs.jsp"%> > > <menu:useMenuDisplayer name="Velocity" > config="WEB-INF/classes/cssHorizontalMenu.vm" > permissions="rolesAdapter"> > <ul id="primary-nav" class="menuList"> > <li class="pad"> </li> > <c:if test="${empty pageContext.request.remoteUser}"><li><a > href="<c:url value="/login.jsp"/>" class="current"><fmt:message > key="login.title"/></a></li></c:if> > <menu:displayMenu name="MainMenu"/> > <menu:displayMenu name="UserMenu"/> > <menu:displayMenu name="FileUpload"/> > <menu:displayMenu name="AdminMenu"/> > <menu:displayMenu name="Logout"/> > </ul> > </menu:useMenuDisplayer> > > Tried everything I can think of. Any help is appreciated > Thanks, > Dylan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > struts-menu-user mailing list > struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/struts-menu-user > -- http://raibledesigns.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642