From http://tomcat.apache.org/tomcat-6.0-doc/logging.html : "Tomcat 6.0 uses Commons Logging <http://commons.apache.org/logging> throughout its internal code allowing the developer to choose a logging configuration that suits their needs,"

Could it be this class is exposed to webapps?

En l'instant précis du 12/02/08 13:51, Rogerio Baldini das Neves s'exprimait en ces termes:
Hi David,

In truth ,I have a library in tomcat lib directory to communicate both 
applications. Using the resource:
<Resource name="jcpbatch/plugin-server" type="com.powerlogic.jcpbatch.pluginservice.JBatchPluginService"
        
factory="com.powerlogic.jcpbatch.pluginservice.JBatchPluginServiceFactory"/>

There are 2 'org.apache.commons.logging.Log' visible. One in app1 and another 
in app2.
But no one in tomcat lib directory. I don't want to put in there because of 
possible collateral effects with others apps.

The message received doesn't come from tomcat but from commons-logging, that is 
the same used in Tomcat 5.5.9.

Isn't it correct that Tomcat should have kept compatibility in this case.
Theorically everything working in Tomcat 5.5.x should work in Tomcat 6.x, or am 
I wrong ?


Thanks a lot,

Rogerio Baldini
jCompany Suite - Product Owner
+55 (31) 3555-0050
[EMAIL PROTECTED]
Powerlogic S.A.



-----Mensagem original-----
De: David Delbecq [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 12 de fevereiro de 2008 09:20
Para: Tomcat Users List
Assunto: Re: Tomcat6 classloader problem

Root of your problem is that: "You have more than one version of 'org.apache.commons.logging.Log' visible"

You say app1 access app2 which access back app1. Webapps in a container should not be able to see each other's classes. Can you tell us which method you used to have those 2 webapps see each other? That could explain why there is 2 Log visible in classloader. Also, it may be that the message comes from commons-logging provided with tomcat, which may not be the same as the one in tomcat 5.5.9. So it may be that the mixup problem was already there but unnoticed in tomcat 5.5.9



En l'instant précis du 12/02/08 12:17, Rogerio Baldini das Neves s'exprimait en ces termes:
Hi,

I am passing through this problem nowadays in Tomcat6:

org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException:

Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.

(Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)

This is my context:

- App1 accessing App2 to start a service, and App2 accessing back App1 to get some information.

-          Problem occurs when App2 is accessing back App1.

I have this configuration in server.xml

    <Resource name="jcpbatch/plugin-server"

type="com.powerlogic.jcpbatch.pluginservice.JBatchPluginService"

factory="com.powerlogic.jcpbatch.pluginservice.JBatchPluginServiceFactory"/>

        and this one in web.xml:

                <resource-env-ref>

<description> JBatchPluginService</description> <resource-env-ref-name>jcpbatch/plugin-server</resource-env-ref-name> <resource-env-ref-type>com.powerlogic.jcpbatch.pluginservice.JBatchPluginService</resource-env-ref-type>

                </resource-env-ref>

-          Both of them have commons-logging-1.0.4.jar in the WEB-INF/lib

VERY IMPORTANT: It has worked perfectly in Tomcat 5.5.9

Any ideas ?

Thanks

Rogerio Baldini

jCompany Suite - Product Owner

+55 (31) 3555-0050

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

Powerlogic S.A.

img





--
http://www.devlog.be (a belgian developer's logs)



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

Reply via email to