Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 110 posts 583 karma points
    Apr 21, 2017 @ 08:04
    Bo Jacobsen
    0

    ERROR Umbraco.Core.UmbracoApplicationBase - Unhandled exception in AppDomain (terminating)

    Hello.

    using Umbraco version 7.5.4 and uCommerce version 7.5.0.17040 and Newsletter Studio version 2.1.5.

    In one of our webapplications we are getting this error, and it shut down the application.

    [P4828/D2/T2] ERROR Umbraco.Core.UmbracoApplicationBase - Unhandled exception in AppDomain (terminating)
    System.NullReferenceException: Object reference not set to an instance of an object.
       at log4net.Appender.RollingFileAppender.AdjustFileBeforeAppend()
       at Umbraco.Core.Logging.AsynchronousRollingFileAppender.OnClose()
       at log4net.Appender.AppenderSkeleton.Close()
       at log4net.Appender.AppenderSkeleton.Finalize()
    

    Maybe its related to this? -> https://our.umbraco.org/forum/using-umbraco-and-getting-started//85278-error-umbracocoredynamicsextensionmethodfinder-failed-to-get-types

    I have started 2 threads because i think its 2 different problems.

  • Sven Geusens 104 posts 605 karma points
    Apr 21, 2017 @ 15:32
    Sven Geusens
    0

    This looks to me like a problem with your log4net config file. Could you post the contents of config/log4net.config ?

  • Bo Jacobsen 110 posts 583 karma points
    Apr 24, 2017 @ 13:54
    Bo Jacobsen
    0

    Hi Sven.

    Thanks for your reply.

    Here is our log4net.config we use for this webapplication. Some names are changed for security reasons. :)

    <?xml version="1.0"?>
    <log4net>
    
      <root>
        <priority value="Info"/>
        <appender-ref ref="AsynchronousLog4NetAppender" />
      </root>
    
      <appender name="rollingFile" type="log4net.Appender.RollingFileAppender">
        <file type="log4net.Util.PatternString" value="App_Data\Logs\UmbracoTraceLog.%property{log4net:HostName}.txt" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <appendToFile value="true" />
        <rollingStyle value="Date" />
        <maximumFileSize value="5MB" />
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value=" %date [P%property{processId}/D%property{appDomainId}/T%thread] %-5level %logger - %message%newline" />
        </layout>
        <encoding value="utf-8" />
      </appender>
    
      <appender name="AsynchronousLog4NetAppender" type="Umbraco.Core.Logging.ParallelForwardingAppender,Umbraco.Core">
        <appender-ref ref="rollingFile" />
      </appender>
    
      <appender name="OurAppender" type="Umbraco.Core.Logging.AsynchronousRollingFileAppender, Umbraco.Core">
        <file value="App_Data\Logs\OurTraceLog.txt" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <appendToFile value="true" />
        <rollingStyle value="Date" />
        <maximumFileSize value="5MB" />
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
        </layout>
        <encoding value="utf-8" />
      </appender>
    
      <!--Here you can change the way logging works for certain namespaces  -->
    
      <logger name="NHibernate">
        <level value="WARN" />
      </logger>
      <logger name="NHibernate.SQL">
        <level value="ERROR"/>
      </logger>
      <logger name="Raven">
        <level value="ERROR"/>
      </logger>
    
      <logger name="our.helper">
        <level value="INFO" />
        <level value="ERROR" />
        <level value="DEBUG" />
        <appender-ref ref="OurAppender" />
      </logger>
    
      <logger name="our.customers.webapplication">
        <level value="INFO" />
        <level value="ERROR" />
        <level value="DEBUG" />
        <appender-ref ref="OurAppender" />
      </logger>
    </log4net>
    
  • Sven Geusens 104 posts 605 karma points
    May 10, 2017 @ 15:15
    Sven Geusens
    0

    Sorry for the late reply

    I don't see anything wrong with the file, but I am no log4net expert. Have you tried replacing the file with the one provided in the umbraco package? Maybe this way you can track down the error.

  • Bo Jacobsen 110 posts 583 karma points
    May 18, 2017 @ 08:43
    Bo Jacobsen
    0

    We use this in a lot of projects and only one has this error.

    After some search the explanation might be that an earlier error prevent log4net access to write about the error occurring.

    But i get back when i know more.

  • Hundebol 158 posts 294 karma points
    May 19, 2017 @ 10:15
    Hundebol
    0

    Hi Bo,

    I get this exact error in my log as well. And an error in backoffice - though i'm not sure they are related (api error 404)

    i've recently upgraded to 7.6.1 where there are changes in the log4net version. So thought that was why I see this error. Guess it's not since you see this on 7.5.4 as well

    I'm hoping you find the answer, as I would like to know as well :)

Please Sign in or register to post replies

Write your reply to:

Draft