Re: Trouble Installing - XML Parse Error?

Matt Raible <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
Sorry for the delay.

Here's what I found in my logs after uncommenting the <Item>:

Caused by: java.lang.NoClassDefFoundError:  
org/apache/commons/lang/StringUtils
         at  
net.sf.navigator.menu.MenuComponent.equals(MenuComponent.java:94)

So I added commons-lang.jar to WEB-INF/lib and it fixed everything.

However, it doesn't solve why the Struts Menu doesn't default to the  
titles in menu-config.xml when you don't have keys for them in  
ApplicationResources.properties.  Please enter that as a bug if you  
have time.

Thanks,

Matt

On Feb 16, 2005, at 7:51 AM, Tim Christopher wrote:

> Hi Matt,
>
> Thanks for offering to help.
>
> I've created a small project that only has my initial setup of the
> struts menu, but which produces the same error as posted before.
> Loading the files in their current state produces a page with a single
> menu item - "???en_GB.Contact???".  If you uncomment the Item element
> within menu-config.xml the server produces errors and it is not
> possible to view the menu at all.
>
> I've uploaded this small application as a *.WAR file to my web space;
> if you'd rather I uploaded all of the files individually (and not as a
> web archive) let me know and I'll sort it.
>
> http://www.thewalkabout.co.uk/forum-posts/struts-menu/WebModule.war
>
> Tim Christopher
>
>
> On Tue, 15 Feb 2005 08:17:40 -0700, Matt Raible  
> <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]> wrote:
>> What's your plugin configuration look like?  Also, please post your
>> JSP.  It looks like it's puking on the XML declaration at the top, but
>> mine looks similar:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> Matt
>>
>> On Feb 14, 2005, at 11:59 AM, Tim Christopher wrote:
>>
>>> Hi,
>>>
>>> I've noticed a few people have had this error in the past, but I
>>> cannot find a solution for it anywhere :o(
>>>
>>> My menu-config.xml file looks like this:
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <MenuConfig>
>>>  <Displayers>
>>>    <Displayer name="CoolMenu"
>>> type="net.sf.navigator.displayer.CoolMenuDisplayer"/>
>>>  </Displayers>
>>>  <Menus>
>>>    <Menu name="MenuFile" title="Contact">
>>>      <Item name="phone" title="Phone" location="?Phone"/>
>>>    </Menu>
>>>  </Menus>
>>> </MenuConfig>
>>>
>>>>>>>
>>>
>>> If I remove the Item tag then a menu bar appears with one heading,
>>> which is "???en_GB.Contact???"; this heading does nothing when you
>>> click on it.
>>>
>>> If I leave the menu-config.xml file as shown above the page does not
>>> load at all; instead it produces the following error message:
>>>
>>> HTTP Status 500 -
>>> Exception:
>>> javax.servlet.ServletException: Exception forwarding for name about:
>>> javax.servlet.ServletException: Failure initializing struts-menu:
>>> Error parsing resource file:
>>> /WEB-INF/resources/xml/config/menu-config.xml nested exception is:  
>>> The
>>> processing instruction target matching "[xX][mM][lL]" is not allowed.
>>> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageC 
>>> on
>>> textImpl.java:825)
>>>     <snip />
>>>
>>> Root Cause:
>>> javax.servlet.jsp.JspException: Exception forwarding for name about:
>>> javax.servlet.ServletException: Failure initializing struts-menu:
>>> Error parsing resource file:
>>> /WEB-INF/resources/xml/config/menu-config.xml nested exception is:  
>>> The
>>> processing instruction target matching "[xX][mM][lL]" is not allowed.
>>> org.apache.struts.taglib.logic.ForwardTag.doForward(ForwardTag.java:
>>> 127)
>>>    <snip />
>>>
>>> As far as I can tell there is nothing wrong with the format of my xml
>>> file (though I cannot find a dtd for it).
>>>
>>> If anyone recognises this error and can help point me in the right
>>> direction then it would be much appreciated.
>>>
>>> Tim Christopher
>>>
>>>
>>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real  
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.