Log4net
  1. Log4net
  2. LOG4NET-43

Specifying an empty string as a property in the config file results in an error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.9
    • Fix Version/s: 1.2.10
    • Component/s: None
    • Labels:
      None

      Description

      Specifying an empty string as a property (either as <property/> or <property></property>) results in the following:

      log4net:ERROR XmlHierarchyConfigurator: Failed to construct object of type [System.String] Exception: System.MissingMethodException: No parameterless constructor defined for this object.
      at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
      at System.Activator.CreateInstance(Type type, Boolean nonPublic)
      at System.Activator.CreateInstance(Type type)
      at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.CreateObjectFromXml(XmlElement element, Type defaultTargetType, Type typeConstraint) in S:\local\log4net-cvs\logging-log4net\src\Repository\Hierarchy\XmlHierarchyConfigurator.cs:line 924

        Activity

        Hide
        Niall Daley added a comment -

        Fix checked in as 1.18

        Show
        Niall Daley added a comment - Fix checked in as 1.18

          People

          • Assignee:
            Niall Daley
            Reporter:
            Niall Daley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development