https://bz.apache.org/bugzilla/show_bug.cgi?id=61253

--- Comment #4 from Coty Sutherland <csuth...@redhat.com> ---
Created attachment 35109
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35109&action=edit
PropertySourceImpl to reproduce with

I didn't add a reproducer earlier, but here's one in case you guys want it...I
also noted after creating this reproducer that the only thing that could cause
the exception to be thrown are unchecked exceptions (in my case, an
IllegalArgumentException).

1) Copy the attached jar into lib
2) Configure catalina.properties to use it

org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.example.digester.PropertySourceImpl

3) Add the trigger substitution to the server.xml so that the exception is
thrown (I couldn't just throw an exception because it made the return
unreachable)

$ sed -i 's@SHUTDOWN@${throwException}@' conf/server.xml

4) Starting or Stopping tomcat will reproduce the issue

WARNING: Attribute 1 failed to update and remains ${throwException}.
java.lang.IllegalArgumentException: Please don't ignore me tomcat :(
        at
org.apache.tomcat.example.digester.PropertySourceImpl.getProperty(PropertySourceImpl.java:12)
        at
org.apache.tomcat.util.IntrospectionUtils.replaceProperties(IntrospectionUtils.java:274)
        at
org.apache.tomcat.util.digester.Digester.updateAttributes(Digester.java:1986)
        at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1170)

Note that in my case I added a warn to log it as I suggested
earlier...otherwise it get's ignored and you have to use a debugger to see the
problem :(

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to