***UNCHECKED*** Logging library conflict with Spring

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

***UNCHECKED*** Logging library conflict with Spring

Dustin Henson-2
I think I have run into a conflict with the commons-logging.jar library used by both Spring Web Flow and Orbeon. Does anyone know what I'm doing to cause this and know how to fix it?

I am trying to build a Spring MVC application that uses Orbeon to return xforms. Orbeon is deployed as a separate WAR file as described here http://www.orbeon.com/ops/doc/reference-xforms-java. After running into some problems I decided to start simple, so I created the basic tutorial application for Spring MVC. When I deployed it by itself in Tomcat it worked fine. However, after I deployed ops.war the logging in the Spring application stopped working. Note that the filter setup has not been done at this point so the two applications should not be unaware of each other. This is the first situation I have seen where deploying one application changes the running of another so I'm stumped as to what's going on. This ops.war is a nightly build from last week. I tried this with both Tomcat 5.5.25 and 6.0.14 and got the same behavior. Any ideas?

Here's the output when only the spring application is deployed. The last 3 lines are the output I'd expect when accessing the hello.htm test page:
Oct 29, 2007 9:45:27 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.5.0_09\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\W
INDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Sonic\MyDVD;C:\Program Files\md5sum;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\GTK\2.0\bin
Oct 29, 2007 9:45:27 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 29, 2007 9:45:27 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1406 ms
Oct 29, 2007 9:45:27 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 29, 2007 9:45:27 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Oct 29, 2007 9:45:27 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 29, 2007 9:45:28 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive spring_test.war
2007-10-29 21:45:29,546 INFO [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring_test]] - <Initializing Spring FrameworkServlet 'springapp'>
2007-10-29 21:45:29,562 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'springapp': initialization started>
2007-10-29 21:45:29,608 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1b48197: display name [We
bApplicationContext for namespace 'springapp-servlet']; startup date [Mon Oct 29 21:45:29 PDT 2007]; root of context hierarchy>
2007-10-29 21:45:29,827 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [/WEB-INF/springapp-servlet.xml]>
2007-10-29 21:45:30,093 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContex
t@1b48197]: org.springframework.beans.factory.support.DefaultListableBeanFactory@16f0be8>
2007-10-29 21:45:30,218 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFact
ory@16f0be8: defining beans [springappController,urlMapping]; root of factory hierarchy>
2007-10-29 21:45:30,499 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'springapp': initialization completed in 937 ms>
Oct 29, 2007 9:45:31 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 29, 2007 9:45:32 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 29, 2007 9:45:32 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
Oct 29, 2007 9:45:32 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 29, 2007 9:45:32 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5094 ms
DEBUG - SpringappController - before logging
2007-10-29 21:46:00,921 INFO [SpringappController] - <SpringappController - returning hello view>
DEBUG - SpringappController - after logging

Here's the output after Ops is deployed. Note the log4j error messages and the missing logger line in the output.
Oct 29, 2007 9:41:55 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.5.0_09\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\W
INDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Sonic\MyDVD;C:\Program Files\md5sum;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\GTK\2.0\bin
Oct 29, 2007 9:41:55 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 29, 2007 9:41:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1531 ms
Oct 29, 2007 9:41:55 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 29, 2007 9:41:55 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Oct 29, 2007 9:41:56 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 29, 2007 9:41:57 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ops.war
Starting Orbeon Forms Release 3.6.0beta.200710170612
Initializing Resource Manager with: {org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.apache.catalina.core.ApplicationContextFacade@1d64c37, oxf.resources.priority.2=org.orbeon.oxf
.resources.ClassLoaderResourceManagerFactory, oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory, oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resources, o
xf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManagerFactory}
Found 0 catalog entries.
Oct 29, 2007 9:42:08 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive spring_test.war
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.

Oct 29, 2007 9:42:12 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 29, 2007 9:42:12 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 29, 2007 9:42:12 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
Oct 29, 2007 9:42:12 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 29, 2007 9:42:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17172 ms
DEBUG - SpringappController - before logging
DEBUG - SpringappController - after logging
My Spring application is attached.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

spring_test.war (3M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ***UNCHECKED*** Logging library conflict with Spring

Alessandro Vernet
Administrator
Dustin,

On 10/29/07, Dustin Henson <[hidden email]> wrote:

>
>  I think I have run into a conflict with the commons-logging.jar library
> used by both Spring Web Flow and Orbeon. Does anyone know what I'm doing to
> cause this and know how to fix it?
>
>  I am trying to build a Spring MVC application that uses Orbeon to return
> xforms. Orbeon is deployed as a separate WAR file as described here
> http://www.orbeon.com/ops/doc/reference-xforms-java. After
> running into some problems I decided to start simple, so I created the basic
> tutorial application for Spring MVC. When I deployed it by itself in Tomcat
> it worked fine. However, after I deployed ops.war the logging in the Spring
> application stopped working. Note that the filter setup has not been done at
> this point so the two applications should not be unaware of each other. This
> is the first situation I have seen where deploying one application changes
> the running of another so I'm stumped as to what's going on. This ops.war is
> a nightly build from last week. I tried this with both Tomcat 5.5.25 and
> 6.0.14 and got the same behavior. Any ideas?
Besides the error message, what is the effect of this issue? Are you
saying that Spring's logging through commons-logging.jar isn't working
anymore when you have Orbeon Forms deployed as well?

I am not sure if this will help here, but you might want to try to
change your web.xml to tell Orbeon Forms not to initialize log4j
(which can help if Log4j has already been initialized). To do this,
set the oxf.initialize-logging context parameter to false.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: ***UNCHECKED*** Logging library conflict with Spring

Erik Bruchez
Administrator
Incidently, we now use version 1.2.15 of log4j, instead of the
(abandonned) 1.3 beta we had for a long time. Not sure if that helps.

-Erik

Alessandro Vernet wrote:

> Dustin,
>
> On 10/29/07, Dustin Henson <[hidden email]> wrote:
>>  I think I have run into a conflict with the commons-logging.jar library
>> used by both Spring Web Flow and Orbeon. Does anyone know what I'm doing to
>> cause this and know how to fix it?
>>
>>  I am trying to build a Spring MVC application that uses Orbeon to return
>> xforms. Orbeon is deployed as a separate WAR file as described here
>> http://www.orbeon.com/ops/doc/reference-xforms-java. After
>> running into some problems I decided to start simple, so I created the basic
>> tutorial application for Spring MVC. When I deployed it by itself in Tomcat
>> it worked fine. However, after I deployed ops.war the logging in the Spring
>> application stopped working. Note that the filter setup has not been done at
>> this point so the two applications should not be unaware of each other. This
>> is the first situation I have seen where deploying one application changes
>> the running of another so I'm stumped as to what's going on. This ops.war is
>> a nightly build from last week. I tried this with both Tomcat 5.5.25 and
>> 6.0.14 and got the same behavior. Any ideas?
>
> Besides the error message, what is the effect of this issue? Are you
> saying that Spring's logging through commons-logging.jar isn't working
> anymore when you have Orbeon Forms deployed as well?
>
> I am not sure if this will help here, but you might want to try to
> change your web.xml to tell Orbeon Forms not to initialize log4j
> (which can help if Log4j has already been initialized). To do this,
> set the oxf.initialize-logging context parameter to false.
>
> Alex
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws