The problem I've found is that the magnolia jar comes deployed with a log4j
configuration. At the root of the jar is a log4j.xml. The configuration
sets the root log4j appender. It seems to override any other log4j.xml
configs you have on your classpath.
Thanks Magnolia - nice work defining a root appender at INFO to selfishly
screw up anybodies else deployments. Not.
The solution I found was to open up the magnolia jar, delete the log4j.xml,
and re-jar it up. Restart and hey presto the log4j configuration that's on
your glassfish server instance classpath starts working.
If you want the magnolia log4j settings then you can place them in the one
central log4j configuration that's on your glassfish server instance
classpath.
Hope that helps. It bugged me too for a few hours.
Rgds,
Crossedbearings.
glassfish-2 wrote:
>
> Hi,
>
> I have configured Jackrabbit to Run on glassfish V2 on Windows XP. Once
> this configuration was done and the repository setup , log4j stopped
> working !!. I have tried my best by including the command line option for
> log4j ( -Dlog4j.debug=true) and still the log4j setup is not working fine.
> I have two web applications running on my glassfish and all of them have a
> local log4j.property file.
>
> log4j was working fine before i had setup jackrabbit and since the
> repository was setup , it does not work anymore. log output from my server
> instance.
>
> If anyone has come across a similar issue and had a way around this ,
> suggestions would be of great help.
>
> Cheers
> Thiag
>
> #|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using context classloader EJBClassLoader
> :
> urlSet = []
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> .|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using context classloader EJBClassLoader
> :
> urlSet = []
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> .|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using EJBClassLoader :
> urlSet = [URLEntry :
> file:/C:/glassfish/domains/domain1/applications/j2ee-modules/jackrabbit-jca-1.3/]
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> class loader.|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using
> ClassLoader.getSystemResource().|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using context classloader
> EJBClassLoader :
> urlSet = []
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> .|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using EJBClassLoader :
> urlSet = [URLEntry :
> file:/C:/glassfish/domains/domain1/applications/j2ee-modules/jackrabbit-jca-1.3/]
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> class loader.|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using EJBClassLoader :
> urlSet = [URLEntry :
> file:/C:/glassfish/domains/domain1/applications/j2ee-modules/jackrabbit-jca-1.3/]
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> class loader.|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using
> ClassLoader.getSystemResource().|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Could not find resource: [null].|#]
>
> [#|2008-06-23T14:41:30.614+0530|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=c555c3a0-bdac-4337-9430-374ebe9eecf6;|log4j:WARN
> No appenders could be found for logger
> (org.apache.jackrabbit.core.RepositoryImpl).|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.xml] using
> ClassLoader.getSystemResource().|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using context classloader
> EJBClassLoader :
> urlSet = []
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> .|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using EJBClassLoader :
> urlSet = [URLEntry :
> file:/C:/glassfish/domains/domain1/applications/j2ee-modules/jackrabbit-jca-1.3/]
> doneCalled = false
> Parent -> java.net.URLClassLoader_at_93bca2
> class loader.|#]
>
> [#|2008-06-23T14:41:30.661+0530|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=c555c3a0-bdac-4337-9430-374ebe9eecf6;|
> log4j:WARN Please initialize the log4j system properly.|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Trying to find [log4j.properties] using
> ClassLoader.getSystemResource().|#]
>
> [#|2008-06-23T14:41:30.097+0530|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|
> log4j: Could not find resource: [null].|#]
>
> [#|2008-06-23T14:41:30.614+0530|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=c555c3a0-bdac-4337-9430-374ebe9eecf6;|log4j:WARN
> No appenders could be found for logger
> [b](org.apache.jackrabbit.core.RepositoryImpl).|#][/b]
>
> [#|2008-06-23T14:41:30.661+0530|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=c555c3a0-bdac-4337-9430-374ebe9eecf6;|
> log4j:WARN Please initialize the log4j system properly.|#]
> [Message sent by forum member 'thiagust' (thiagust)]
>
> http://forums.java.net/jive/thread.jspa?messageID=281913
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>
--
View this message in context: http://www.nabble.com/Issue-with-Jackrabbit-log4j-on-Glassfish-Windows-XP-tp18065536p22906014.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.