You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Vikas Phonsa <VP...@suz.com> on 2004/08/12 20:20:30 UTC

logging problems

Hi Everybody,

I'm having some serious problems with logging. I have a web service in which
I have a servlet that loads up with the axis servlets, that servlet
initializes the commons logging and sets a log factory. When I start the
application up I get an exception which says:

org.apache.commons.discovery.DiscoveryException: No implementation defined
for org.apache.commons.logging.LogFactory

As I said my servlet has already created a log factory. It looks that axis
is trying to set another one for itself and it throws the exception. 

Could some one tell what's going on it the following code in the 
org.apache.axis.components.logger.LogFactory class:

-------------
private static final org.apache.commons.logging.LogFactory getLogFactory() {
        return (org.apache.commons.logging.LogFactory)
            AccessController.doPrivileged(
                new PrivilegedAction() {
                    public Object run() {
                        return
DiscoverSingleton.find(org.apache.commons.logging.LogFactory.class,
 
org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES,
 
org.apache.commons.logging.LogFactory.FACTORY_DEFAULT);
                    }
                });
    
------------------

I need the getLogFactory() to just return the commons log factory that I
have already set in my servlet.

Any help would be appreciated.

Thanks
Vikas

Following is the exception stack trace




-------------------------------------------

[8/12/04 10:39:33:711 PDT] 4e16056c WebGroup      E SRVE0020E: [Servlet
Error]-[AdminServlet]: Failed to load servlet:
java.lang.ExceptionInInitializerError:
org.apache.commons.discovery.DiscoveryException: No implementation defined
for org.apache.commons.logging.LogFactory
	at
org.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java:404
)
	at
org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.j
ava:579)
	at
org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.
java:418)
	at
org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.
java:378)
	at
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:84)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:8
0)
	at
org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:72)
	at
org.apache.axis.transport.http.AxisServlet.<clinit>(AxisServlet.java:101)
	at java.lang.Class.forName1(Native Method)
	at java.lang.Class.forName(Class.java(Compiled Code))
	at
org.apache.axis.transport.http.AxisServletBase.class$(AxisServletBase.java:8
7)
	at
org.apache.axis.transport.http.AxisServletBase.<clinit>(AxisServletBase.java
:94)
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Class.java:262)
	at java.beans.Beans.instantiate(Beans.java:233)
	at java.beans.Beans.instantiate(Beans.java:77)


-----Original Message-----
From: Raúl Carrasco [mailto:rcl@moviquity.com] 
Sent: Wednesday, August 11, 2004 8:26 AM
To: axis-user@ws.apache.org
Subject: Sending exceptions

    Hi there!

    I'm programming a webservice running on JBoss 3.2.1. My methods throw a
kind of exception that extends RemoteException. However, the client receives
an AxisFaultException.

    Please, help me! How can I recover my class?! Should I register in a
special way the class in the wsdd file? I've registered the exception as a
Bean, as I've done with the rest of the classes that are sent between client
and server. I'm not sure if this is the right method for exceptions.

    Thanks a lot for your help!

Raul Carrasco
rcl@moviquity.com