Issue Details (XML | Word | Printable)

Key: LOG4NET-43
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Niall Daley
Reporter: Niall Daley
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Log4net

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

Created: 23/Aug/05 01:26 AM   Updated: 08/Mar/06 12:20 AM
Return to search
Component/s: None
Affects Version/s: 1.2.9
Fix Version/s: 1.2.10

Time Tracking:
Not Specified

Resolution Date: 23/Aug/05 01:32 AM


 Description  « Hide
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

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #312305 Mon Aug 22 16:31:15 UTC 2005 niall Fix for LOG4NET-43. Handles empty string properties by creating an empty string rather than attempting to construct one.

PR:
Obtained from:
Submitted by:
Reviewed by:
Files Changed
MODIFY /logging/log4net/trunk/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs

Niall Daley added a comment - 23/Aug/05 01:32 AM
Fix checked in as 1.18

Niall Daley made changes - 23/Aug/05 01:32 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Repository Revision Date User Message
ASF #312306 Tue Aug 23 11:33:32 UTC 2005 nicko Update for LOG4NET-43. Updated error message to be more explicit on incorrect type. Restricted empty string fix only to empty element nodes.
Files Changed
MODIFY /logging/log4net/trunk/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs

Nicko Cadell made changes - 08/Mar/06 12:20 AM
Summary Specifiying an emtpy string as a property in the config file results in an error Specifying an empty string as a property in the config file results in an error