Commons Logging
  1. Commons Logging
  2. LOGGING-61

contextClassLoader null returned in LogFactory.java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      I was trying to deploy Axis beta3 on iPlanet 6 and kept getting the following
      exception.

      lang.ExceptionInInitializerError: java.lang.NullPointerException
      at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:326)
      at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:394)
      at org.apache.axis.transport.http.AxisServlet.<clinit>(AxisServlet.java:104)
      at java.lang.Class.newInstance0(Native Method)
      at java.lang.Class.newInstance(Class.java:232)
      at
      com.iplanet.server.http.servlet.WServletEntity.loadAndInitServlet(WServletEntity.java:71)
      at
      com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1045)
      at
      com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:959)

      Found another guy getting the same problem that was posting to the Axis mailing
      list. Here is a URL to his posts:
      http://www.mail-archive.com/axis-user@xml.apache.org/msg04319.html

      He mentioned a hack he did and I did the same and it seemed to fix the problem.
      I don't know whether I may have broke something else but my Axis web services
      are working fine now...

      Here is the hack in LogFactory.java at line 264 in method getFactory():

      /sjb - hack to default back/
      if(contextClassLoader==null)

      { contextClassLoader = ClassLoader.getSystemClassLoader(); }

      Cheers...

        Activity

        Hide
        Richard A. Sitze added a comment -
            • COM-118 has been marked as a duplicate of this bug. ***
        Show
        Richard A. Sitze added a comment - COM-118 has been marked as a duplicate of this bug. ***
        Hide
        steve bryant added a comment -

        Also, I forgot to throw this helpful bits in the bug report. I deployed this
        service with no problems on Linux JVM 1.3.1_03 and Tomcat 4.0.3. This error
        occurred while deploying the Axis service on iPlanet on a Solaris JVM 1.3.1.
        Sorry about that. The Axis service now works fine on both platforms.

        -sjb

        Show
        steve bryant added a comment - Also, I forgot to throw this helpful bits in the bug report. I deployed this service with no problems on Linux JVM 1.3.1_03 and Tomcat 4.0.3. This error occurred while deploying the Axis service on iPlanet on a Solaris JVM 1.3.1. Sorry about that. The Axis service now works fine on both platforms. -sjb
        Hide
        Richard A. Sitze added a comment -

        Fix checked in tonight. Please let me know ASAP if this corrects
        your problem. BTW, calling 'ClassLoader.getSystemClassLoader'
        is not portable to early JVM's, so it is not an acceptable solution
        for commons-logging.

        Show
        Richard A. Sitze added a comment - Fix checked in tonight. Please let me know ASAP if this corrects your problem. BTW, calling 'ClassLoader.getSystemClassLoader' is not portable to early JVM's, so it is not an acceptable solution for commons-logging.

          People

          • Assignee:
            Unassigned
            Reporter:
            steve bryant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development