commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel A Paraz <mpa...@mparaz.com>
Subject [Logging] NullPointerException at getCachedFactory/Hashtable in AxisServlet
Date Thu, 27 Jun 2002 14:24:06 GMT
Hi,
I can't tell if this is a Commons Logging or Axis problem:

When I run the Axis AdminClient for a deploy.wsdd, I get the attached file in
the Tomcat log.

For this part:

Caused by: java.lang.NullPointerException
        at java.util.Hashtable.get(Hashtable.java:326)
        at org.apache.commons.logging.LogFactory.getCachedFactory(LogFactory.java:499)

I changed LogFactory.java around line 99 to:

        if (factory==null) {

            assert (factories != null);
            assert (LogFactory.class.getClassLoader() != null);

            factory = (LogFactory) factories.get(LogFactory.class.getClassLoader());
        }


and compiled it with '-source 1.4' with JDK 1.4 to check if:

    protected static Hashtable factories = new Hashtable();

is null, or the hash key is null.

Even if I 'set TOMCAT_OPTS=-ea' to turn on assertions, the assert's don't
catch any problem.

Any reason why 

I'm using Tomcat 4.0.3 and CVS versions of Axis, commons, and log4j from a
few days ago.  I was previously using release versions of commons and log4j
but I was getting this error:

  Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor
  ...
  Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category

which I read was due to that deprecated class.

Thanks in advance!

-- 
http://mparaz.com
+63-916-423-7922



Mime
View raw message