You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anoop kumar V <an...@gmail.com> on 2007/01/23 23:33:23 UTC

User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

When I start my tomcat server with our application, I get the following
errors and the tomcat fails to startup:

SEVERE: End event threw exception
org.apache.commons.logging.LogConfigurationException: User-specified log
class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not
useable.
        at
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(
LogFactoryImpl.java:798)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:601)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:333)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:307)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
        at org.apache.commons.beanutils.ConvertUtilsBean.<init>(
ConvertUtilsBean.java:130)
        at org.apache.commons.beanutils.BeanUtilsBean.<init>(
BeanUtilsBean.java:110)
        at org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(
BeanUtilsBean.java:68)
        at org.apache.commons.beanutils.ContextClassLoaderLocal.get(
ContextClassLoaderLocal.java:80)
        at org.apache.commons.beanutils.BeanUtilsBean.getInstance(
BeanUtilsBean.java:78)
        at org.apache.commons.beanutils.ConvertUtilsBean.getInstance(
ConvertUtilsBean.java:115)
        at org.apache.commons.beanutils.ConvertUtils.convert(
ConvertUtils.java:217)
        at org.apache.commons.digester.CallMethodRule.end(
CallMethodRule.java:560)
        at org.apache.commons.digester.Rule.end(Rule.java:230)
        at org.apache.commons.digester.Digester.endElement(Digester.java
:1130)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1647)
        at org.apache.catalina.startup.ContextConfig.applicationConfig(
ContextConfig.java:220)
        at org.apache.catalina.startup.ContextConfig.start(
ContextConfig.java:579)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
ContextConfig.java:181)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
LifecycleSupport.java:119)
        at org.apache.catalina.core.StandardContext.start(
StandardContext.java:3643)
        at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:776)
        at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:759)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java
:537)
        at org.apache.catalina.core.StandardHostDeployer.install(
StandardHostDeployer.java:260)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java
:730)
        at org.apache.catalina.startup.HostConfig.deployDirectories(
HostConfig.java:625)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
:374)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:784)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(
HostConfig.java:330)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1155)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java
:696)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
:1147)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java
:310)
        at org.apache.catalina.core.StandardService.start(
StandardService.java:449)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java
:2212)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:458)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:345)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:150)


I googled around and found that the TraceLogger class must have a
constructor with a single String parameter. So I checked for that:

C:\Documents and Settings\akumar\Desktop\Downloads>javap
com.sun.idm.logging.trace.TraceLogger
Compiled from "TraceLogger.java"
public class com.sun.idm.logging.trace.TraceLogger extends
java.lang.Objectimplements
org.apache.commons.logging.Log{
    public static final java.lang.String code_id;
    public com.sun.idm.logging.trace.TraceLogger(java.lang.String);
    public boolean isTraceEnabled();
    public boolean isDebugEnabled();
    public boolean isInfoEnabled();
    public boolean isWarnEnabled();
    public boolean isErrorEnabled();
    public boolean isFatalEnabled();
    public void trace(java.lang.Object);
    public void trace(java.lang.Object, java.lang.Throwable);
    public void debug(java.lang.Object);
    public void debug(java.lang.Object, java.lang.Throwable);
    public void info(java.lang.Object);
    public void info(java.lang.Object, java.lang.Throwable);
    public void warn(java.lang.Object);
    public void warn(java.lang.Object, java.lang.Throwable);
    public void error(java.lang.Object);
    public void error(java.lang.Object, java.lang.Throwable);
    public void fatal(java.lang.Object);
    public void fatal(java.lang.Object, java.lang.Throwable);
    static {};
}


And it is there: A constructor with a single String argument. But I still
get the above errors. Can someone help me please.

-- 
Thanks and best regards,
Anoop

RE: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Anoop kumar V [mailto:anoopkumarv@gmail.com] 
> Subject: Re: User-specified log class 
> 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is 
> not useable.
> 
> as soon as I deleted the j2ee.jar from the 
> webapp/<app>/WEB-INF/lib everything seemed
> to work just fine.
> 
> I cannot pull the jar out - because this is a product 
> implementation and we need to provide one big war to
> the deployment team...

You must pull the j2ee.jar out - it should not be present inside the
webapp on any container that I'm aware of, since the container itself
provides the necessary subset of J2EE classes.  The presence of j2ee.jar
within a webapp can only lead to conflicts and problems that are
difficult to diagnose.  The mailing list archives have lots of incidents
of this type.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by Zack Grafton <za...@gmail.com>.
The reason they don't load the classes where ever they may be found is 
because different web apps may be using different
versions of the API.  This could provide inconsistencies that could 
cause applications to fail unexpectedly,  or cause  errors
more abstract than most developers would want to deal with.

On top of that some APIs belong to the application server instead of the 
webapp and a separation between web app libraries
and server libraries is very necessary.  Tomcat isn't the only 
application container that would give this error either, try it using
Jetty or some other app server. The specs were designed by very 
intelligent people(in most cases)  and things are done certain
ways for a reason.

Anyway, I hope I don't sound like a jerk.  These are some things that 
the spec or the documentation might not specify that could
use some explaining, so I figured an explanation might not hurt.  I hope 
that I was able to help someone with this information.

Zack

Anoop kumar V wrote:
> Yes  - the documentation does help. But I think Tomcat is a bit too 
> strict
> in applying the specs - or maybe the specs are too rigid. Why not load
> classes wherever they are found!!
>
> Anyways - The delivery of the environment was today and as soon as I 
> deleted
> the j2ee.jar from the webapp/<app>/WEB-INF/lib everything seemed to work
> just fine.
>
> I cannot pull the jar out - because this is a product implementation 
> and we
> need to provide one big war to the deployment team...
>
> Thanks so much,
> Anoop
>
> On 1/23/07, Mark Thomas <ma...@apache.org> wrote:
>>
>> Jacob Rhoden wrote:
>> > You raise a question I have been wondering about for quite some time,
>> > why is it that some libraries need to go in different places, I 
>> tend to
>> > just copy them to different places until it works (: How does one 
>> learn
>> > these things?
>>
>> Reading the documentation is usually a good place to start.
>> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by Anoop kumar V <an...@gmail.com>.
Yes  - the documentation does help. But I think Tomcat is a bit too strict
in applying the specs - or maybe the specs are too rigid. Why not load
classes wherever they are found!!

Anyways - The delivery of the environment was today and as soon as I deleted
the j2ee.jar from the webapp/<app>/WEB-INF/lib everything seemed to work
just fine.

I cannot pull the jar out - because this is a product implementation and we
need to provide one big war to the deployment team...

Thanks so much,
Anoop

On 1/23/07, Mark Thomas <ma...@apache.org> wrote:
>
> Jacob Rhoden wrote:
> > You raise a question I have been wondering about for quite some time,
> > why is it that some libraries need to go in different places, I tend to
> > just copy them to different places until it works (: How does one learn
> > these things?
>
> Reading the documentation is usually a good place to start.
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
>
> Mark
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and best regards,
Anoop

Re: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by Mark Thomas <ma...@apache.org>.
Jacob Rhoden wrote:
> You raise a question I have been wondering about for quite some time,
> why is it that some libraries need to go in different places, I tend to
> just copy them to different places until it works (: How does one learn
> these things?

Reading the documentation is usually a good place to start.
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by Jacob Rhoden <ja...@rhoden.id.au>.
You raise a question I have been wondering about for quite some time, 
why is it that some libraries need to go in different places, I tend to 
just copy them to different places until it works (: How does one learn 
these things?

Christopher Schultz wrote:
> If you are putting it into your webapp's WEB-INF/lib directory, that
> might not work. I see in the stack trace that this code is executing:
>
>   
>
>>        at org.apache.commons.digester.Digester.parse(Digester.java:1647)
>>        at org.apache.catalina.startup.ContextConfig.applicationConfig(
>> ContextConfig.java:220)
>>        at org.apache.catalina.startup.ContextConfig.start(
>> ContextConfig.java:579)
>>        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
>> ContextConfig.java:181)
>>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
>> LifecycleSupport.java:119)
>>        at org.apache.catalina.core.StandardContext.start(
>> StandardContext.java:3643)
>>     
>
> This suggests to me that Tomcat might need your log class in the
> server's lib directory in order to use it. Try putting your custom
> logger's JAR file into TOMCAT_HOME/server/lib and try again.
>
> Hope that helps,
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFtqJb9CaO5/Lv0PARAj5JAKCAdIrqmRm9yw5Z4wrW3+nfRNVN+QCgu7nH
> aFR8O0P1+rt/k9CMC1P0YUs=
> =3hy5
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


-- 
__________________________________________
Jacob Rhoden - http://www.jacobrhoden.com/


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: User-specified log class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not useable.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anoop,

Anoop kumar V wrote:
> When I start my tomcat server with our application, I get the following
> errors and the tomcat fails to startup:
> 
> SEVERE: End event threw exception
> org.apache.commons.logging.LogConfigurationException: User-specified log
> class 'com.sun.idm.logging.trace.TraceLogger' cannot be found or is not
> useable.

The only thing that I can think of is that you do not have your library
in the right place. Where are you putting the JAR file containing your
logger?

If you are putting it into your webapp's WEB-INF/lib directory, that
might not work. I see in the stack trace that this code is executing:

>        at org.apache.commons.digester.Digester.parse(Digester.java:1647)
>        at org.apache.catalina.startup.ContextConfig.applicationConfig(
> ContextConfig.java:220)
>        at org.apache.catalina.startup.ContextConfig.start(
> ContextConfig.java:579)
>        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
> ContextConfig.java:181)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:119)
>        at org.apache.catalina.core.StandardContext.start(
> StandardContext.java:3643)

This suggests to me that Tomcat might need your log class in the
server's lib directory in order to use it. Try putting your custom
logger's JAR file into TOMCAT_HOME/server/lib and try again.

Hope that helps,
- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtqJb9CaO5/Lv0PARAj5JAKCAdIrqmRm9yw5Z4wrW3+nfRNVN+QCgu7nH
aFR8O0P1+rt/k9CMC1P0YUs=
=3hy5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org