How about removing commons-logging jar in WEB-INF/lib? -- dims
On Sun, Aug 31, 2008 at 10:34 AM, Marc F. <[EMAIL PROTECTED]> wrote: > First of all, I would like to thank everyone from the Apache Axis2 project. > I am using the newer version 1.4.1 of Axis2, with Java 1.4.2. Thank you very > much for the efforts in order to make Axis2 compatible to that version of > Java. I work at a software company that still uses Java 1.4.2, that´s why we > decided to use Axis2. Othewise we would discard Axis2. Not to mention the C > language compatibility that Axis2 has. We also use C language in our > development, so probably one day we will also take advantage of this feature > of Axis2. Thank you, Axis2 team! > > Well, now my question... > > Since the jar file "commons-logging-1.1.1.jar" comes with Axis2, in the > WEB-INF/lib/ directory of its war file, I believe Axis2 should use the > version 1.1.1 of the commons-logging API. > > Tomcat 5.0.28 uses by default the commons-logging version 1.0.4. The > "commons-logging-api.jar" file that Tomcat 5.0.28 uses by default is located > in [CATALINA_HOME]/bin/ directory. I believe this jar file is loaded when we > startup Tomcat. > > If I do not modify anything in the environment, that is, if I accept a > default environment, with the "axis2.war" file installed in the > [CATALINA_HOME]/webapps/ directory, exactly according to the Axis2 > installation manual, everything seems to be working correctly. But, I think > everything ONLY seems to be working correctly, because I have the following > question: when I call the Axis2 Happiness page I see that the > commons-logging API version that seems to be used by Axis2 is the one > located inside "commons-logging-api.jar" in the [CATALINA_HOME]/bin/ > directory, and not the one located inside "commons-logging-1.1.1.jar" in the > [CATALINA_HOME]/webapps/axis2/WEB-INF/lib/ directory. Isn´t that strange? I > mean, if Axis2 should use the version 1.1.1, isn´t there something wrong in > this default environment? > > I understand the Tomcat classloading mechanism, and I can comprehend why the > default commons-logging API version 1.0.4 that comes with Tomcat has the > precedence over the version 1.1.1 that comes with Axis2. My question is just > this: isn´t there something wrong in this default environment? > > I notice that even in the Axis2 manual there is a picture that shows the > Axis2 Happiness page, where we can see the > [CATALINA_HOME]/bin/commons-logging-api-jar as one of the "Essential > components", so everybody could think "oh, since even in the Axis2 manual > there is such a picture, that´s normal, everything should be correct", but I > am the exception. I cannot avoid this sensation that there is something > wrong, and again, the same question appears in my mind, and it´s been > causing troubles in my mind. I can´t even sleep well during the night, > because I´ve been always asking myself the same question: isn´t there > something wrong in this default environment? I am using Axis2 at my company, > in a real production environment, so that´s why I am so worried about this > issue. > > I tried to replace the [CATALINA_HOME]/bin/commons-logging-api-jar by that > one that comes with Axis2. I did that renaming the > "commons-logging-1.1.1.jar" to "commons-logging-api.jar", and then I put > this renamed jar file in the [CATALINA_HOME]/bin/ directory. I know this > version of Tomcat hardcoded the name of the jar file in its source code, > therefore that´s why we should rename the jar file if we want to use a newer > version of that API, othewise we are not even able to startup Tomcat. The > problem is that, when I did that, the following exception happened during > the startup: > > SEVERE: End event threw exception > org.apache.commons.logging.LogConfigurationException: User-specified log > class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is > not useable. > > And then the axis2 context is not initialized. > > Isn´t this fact strange? I mean, now I am trying to make, "by brute force", > the version 1.1.1 of commons-logging available to the Axis2 environment, > that is the version that is supposed to work with Axis2, but when I do that, > the axis2 context is not even being initialized! The Tomcat itself and all > the rest of its contexts is being initialized, except axis2 context. I am > trying to make the correct version of the API available, but it seems that > Axis2 is not accepting this. Isn´t that strange? Isn´t that contradictory? > > My next try was putting the "commons-logging-1.1.1.jar" file in the > [CATALINA_HOME]/common/endorsed/ (without renaming the jar file ), but it > was again unsuccessful. The same problem happened, the same exception > occurred. > > Of course, when I comment the line > "org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger", > from the > [CATALINA_HOME]/webapps/axis2/WEB-INF/classes/commons-logging.properties, > the axis2 context is, at least, initialized. But is it really permitted > (commenting that line)? Does Axis2 still work properly when we comment that > line? > > > Thanks in advance! > -- Davanum Srinivas :: http://davanum.wordpress.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
