tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: org.apache.commons.digester.Digester endElement (Q & A)
Date Thu, 10 Jan 2008 18:53:37 GMT
Sorry but you're still posting only a partial context.xml file and it 
still looks like invalid XML.  Get a XML validator and check your 
files.  I know NetBeans has one built-in.  To illustrate the whole valid 
vs. invalid point:

Valid xml -- note the invalid xml fragment wrapped in a comment so it 
doesn't count:

<Context path="">
    <!--
      <Context path="something"
    -->
</Context>

Invalid xml -- note the begin tag is commented out leaving an end tag 
w/o a begin:

<!--
<Context path="">
-->
  <Logger />
</Context>

--David

Albretch Mueller wrote:

> David,
>~
> sorry for my delay . . .
>~
> there is nothing to be shown. it is a config issue which you could
>reproduce by:
>~
> 1) downloading tc 4.1.36
>~
> 2) giving it a first run to make sure everything is OK
>~
> 2) writing, within the admin.xml or manage.xml conf files, something like
>~
><Context
>   path="/admin"
>   docBase="../server/webapps/admin"
>~
> without closing the parentesis
>~
> I do this kind of stuff, heavily commenting conf files, constantly to
>reset these folders when I go from a Linux to a WIndows Box
>~
> lbrtchx
>
>On 1/5/08, David Smith <dns4@cornell.edu> wrote:
>  
>
>>I just realized what you posted was just a very narrow excerpt of the
>>comment block only.  Could you provide a complete example?
>>
>>--David
>>
>>David Smith wrote:
>>    
>>
>>>What I see below is a comment <!-- .... --> block that does not
>>>encompass both the beginning and ending <Context > elements.  This
>>>would fail if run through a XML validator.  If the begin element is in
>>>the comment, so should it's corresponding end element.  Additionally
>>>be careful you don't try to nest comments.  <!-- Some comment <!--
>>>Another comment --> --> does not work.
>>>
>>>--David
>>>
>>>Albretch Mueller wrote:
>>>      
>>>
>>>> if you find exceptions looking like this:
>>>>~
>>>>org.apache.commons.digester.Digester endElement
>>>>SEVERE: End event threw exception
>>>>java.lang.reflect.InvocationTargetException
>>>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>  at
>>>>
>>>>        
>>>>
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    
>>
>>>>  at
>>>>
>>>>        
>>>>
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>    
>>
>>>>  at java.lang.reflect.Method.invoke(Method.java:597)
>>>>  at
>>>>
>>>>        
>>>>
>>org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
>>    
>>
>>>>  at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:217)
>>>>  at org.apache.commons.digester.Rule.end(Rule.java:253)
>>>>  at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
>>>>  at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
>>>>Source)
>>>>. . .
>>>>~
>>>> it means what is says ;-)
>>>>~
>>>> but what I think is wrong is that TC conf parsers apparently attempt
>>>>to parse into the comments so that if you have some not well-formed
>>>>xml inside the comments, such as:
>>>>~
>>>><!--
>>>>
>>>>    Context configuration file for the Tomcat Administration Web App
>>>>
>>>>    $Id: admin.xml 288428 2002-07-23 12:12:15Z remm $
>>>>
>>>> W Box at Work:
>>>>
>>>><Context
>>>>
>>>>docBase="C:\cmllpz\prjx\java\GWB\tc\tc-4.1.36\server\webapps\admin"
>>>>
>>>>    <Logger
>>>>          directory="C:\cmllpz\prjx\java\GWB\logs"
>>>>-->
>>>>~
>>>> they would pick it up
>>>>~
>>>> I was using TC 4.1.36 but I think this is a bug. After being fed a
>>>>start comment, "<!--", sequence parsers should not attempt to resume
>>>>parsing till they fully get an ending, "-->", one
>>>>~
>>>> Or?
>>>>~
>>>> lbrtchx
>>>>
>>>>---------------------------------------------------------------------
>>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To start a new topic, e-mail: users@tomcat.apache.org
>>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message