You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Miguel A Paraz <mp...@mparaz.com> on 2002/06/27 16:24:06 UTC

[Logging] NullPointerException at getCachedFactory/Hashtable in AxisServlet

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