Hi,

I'm guessing that log4j as an external third-party jar needs to be given
permission in a web container environment to do things like send emails
and write to the file system(?).

If so, can anyone tell me how to grant these privileges?

Thanks

Rakesh

-----Original Message-----
From: Rakesh Patel 
Sent: 21 October 2005 18:17
To: Log4J Users List
Subject: RE: Log4j not working


Hi All,

Everythings almost working! Just the SMTPAppender is throwing an error:

[#|2005-10-21T18:07:01.375+0100|WARNING|sun-appserver-pe8.1_01|javax.ent
erprise.system.stream.err|_ThreadID=28;|
log4j:ERROR Could not create an Appender. Reported error follows.|#]

[#|2005-10-21T18:07:01.390+0100|WARNING|sun-appserver-pe8.1_01|javax.ent
erprise.system.stream.err|_ThreadID=28;|
java.security.AccessControlException: access denied
(java.util.PropertyPermission * read,write)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.
java:269)
        at
java.security.AccessController.checkPermission(AccessController.java:401
)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at
java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:124
3)
        at java.lang.System.getProperties(System.java:501)
        at org.apache.log4j.net.SMTPAppender.activateOptions(Unknown
Source)
        at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
        at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:
210)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.
java:140)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigur
ator.java:153)
        at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMCon
figurator.java:415)
        at
org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
        at
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:66
6)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:61
6)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:60
2)
        at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConver
ter.java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:107)
        at
org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.ja
va:101)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:257)
        at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
        at
org.springframework.web.context.ContextLoader.<init>(ContextLoader.java:
118)
        at
org.springframework.web.context.ContextLoaderListener.createContextLoade
r(ContextLoaderListener.java:56)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:47)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:4010)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4522
)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:827)
        at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125
)
        at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerB
ase.java:147)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279
)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006
)
        at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(We
bModuleDeployEventListener.java:160)
        at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(We
bModuleDeployEventListener.java:238)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployE
ventListener(AdminEventMulticaster.java:918)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployE
vent(AdminEventMulticaster.java:905)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminE
ventMulticaster.java:427)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(Admi
nEventMulticaster.java:139)
        at
com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multic
astEvent(DeploymentNotificationHelper.java:288)
        at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEv
ent(DeploymentServiceUtils.java:155)
        at
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEv
ent(ServerDeploymentTarget.java:258)
        at
com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.jav
a:87)
        at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(Deplo
ymentPhase.java:71)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(
PEDeploymentService.java:633)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploy
mentService.java:361)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploy
mentService.java:396)
        at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(Applicatio
nsConfigMBean.java:702)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.j
ava:302)
        at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.j
ava:357)
        at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.j
ava:213)
        at
com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBea
nServerInterceptor.java:815)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
        at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54
)
        at $Proxy1.invoke(Unknown Source)
        at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(Sunone
Interceptor.java:272)
        at
com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(Inv
okeCaller.java:38)
        at
com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.han
dle(MBeanServerRequestHandler.java:92)
        at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorSer
vlet.processRequest(RemoteJmxConnectorServlet.java:69)
        at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorSer
vlet.doPost(RemoteJmxConnectorServlet.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav
a:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFi
lterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC
hain.java:161)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:225)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:173)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:161)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:132)
        at org.apache.catalina.core.StandardPipeline.invok|#]

[#|2005-10-21T18:07:01.390+0100|WARNING|sun-appserver-pe8.1_01|javax.ent
erprise.system.stream.err|_ThreadID=28;|e(StandardPipeline.java:551)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
Task.java:653)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
Task.java:534)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorT
ask.java:403)
        at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.j
ava:55)
|#]

[#|2005-10-21T18:07:01.390+0100|WARNING|sun-appserver-pe8.1_01|javax.ent
erprise.system.stream.err|_ThreadID=28;|
log4j:ERROR Could not parse input source
[EMAIL PROTECTED]|#]

[#|2005-10-21T18:07:01.390+0100|WARNING|sun-appserver-pe8.1_01|javax.ent
erprise.system.stream.err|_ThreadID=28;|
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:393)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.
java:141)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigur
ator.java:153)
        at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMCon
figurator.java:415)
        at
org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
        at
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:66
6)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:61
6)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:60
2)
        at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConver
ter.java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.apache.log4j.Logger.getLogger(Logger.java:107)
        at
org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.ja
va:101)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImp
l.java:257)
        at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
        at
org.springframework.web.context.ContextLoader.<init>(ContextLoader.java:
118)
        at
org.springframework.web.context.ContextLoaderListener.createContextLoade
r(ContextLoaderListener.java:56)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:47)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:4010)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4522
)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:827)
        at
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125
)
        at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerB
ase.java:147)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279
)
        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006
)
        at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(We
bModuleDeployEventListener.java:160)
        at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(We
bModuleDeployEventListener.java:238)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployE
ventListener(AdminEventMulticaster.java:918)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployE
vent(AdminEventMulticaster.java:905)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminE
ventMulticaster.java:427)
        at
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(Admi
nEventMulticaster.java:139)
        at
com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multic
astEvent(DeploymentNotificationHelper.java:288)
        at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEv
ent(DeploymentServiceUtils.java:155)
        at
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEv
ent(ServerDeploymentTarget.java:258)
        at
com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.jav
a:87)
        at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(Deplo
ymentPhase.java:71)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(
PEDeploymentService.java:633)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploy
mentService.java:361)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploy
mentService.java:396)
        at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(Applicatio
nsConfigMBean.java:702)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.j
ava:302)
        at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.j
ava:357)
        at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.j
ava:213)
        at
com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBea
nServerInterceptor.java:815)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
        at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54
)
        at $Proxy1.invoke(Unknown Source)
        at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(Sunone
Interceptor.java:272)
        at
com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(Inv
okeCaller.java:38)
        at
com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.han
dle(MBeanServerRequestHandler.java:92)
        at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorSer
vlet.processRequest(RemoteJmxConnectorServlet.java:69)
        at
com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorSer
vlet.doPost(RemoteJmxConnectorServlet.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav
a:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFi
lterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC
hain.java:161)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:225)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:173)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:161)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:132)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
51)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
Task.java:653)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(Processor
Task.java:534)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorT
ask.java:403)
        at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.j
ava:55)
|#]

Google brings up a lot of stuff but nothing useful in this area. My main
app uses email without needing any additional security settings.

Cheers

Rakesh

-----Original Message-----
From: Rakesh Patel 
Sent: 21 October 2005 17:20
To: Log4J Users List
Subject: RE: Log4j not working


Thanks for that information Jake. I checked the Sun docs and yes, it
does load parent first. I decided to reinstall the app server (I've been
having issues for a while now with memeory consumption since adding web
service utilities) and found that there is no bundled log4j.jar. This
means I must have added it to the server common directory myself at some
point.

Anyway, the app now deploys and is definitely using the
WEB_INF/lib/log4j-1.2.9.jar.

The double logging problem may be harder to solve though because I
believe you are correct - the app server is configuring itself first at
start up (I think it uses commons logging over java.util.logging). I'll
check to see if I can change it via some server setting.

Thanks

Rakesh

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: 21 October 2005 15:56
To: Log4J Users List
Subject: Re: Log4j not working



It all makes complete sense if the Sun appserver is using parent first
classloading.  It is easy to work with Log4j in Tomcat for app-specific
logging because Tomcat implements child-first classloading.  The server
gets its version of Log4j in the server classpath and the the app gets
its version in WEB-INF/lib along with the config in WEB-INF/classes.

In this case, the only log4j.jar that is being loaded (assuming
parent-first) is the one at the server level.  The one at the app level
is being ignored because the log4j packages are already loaded by the
server.  Auto-configuration is happening at the server level up on
server startup.  Auto-configuration is done via a static initializer so
it won't happen again until server restart.

There are a few ways to approach this:

1.  Use a global logging configuration; one that applies to both the
server and apps.  If depending on autoconfiguration, put the logging
file in the server classpath before any other config file that might be
lurking in jars and, probably use a log4j.xml file instead of
log4j.properties because log4j.xml file are loaded in preference to
log4j.properties files.  Or use the system property to point to the
config file (don't recall ATM what that is called right now?).

2.  Similar to above, but manually configure the default logger
repository at app startup, such as in a servlet context listener, or the
like.

3.  Use a logger repository selector to provide for app-specific logging
in separate logger repositories, even though the app is using the same
instance of log4j.jar that the server is using.  See the wiki for
infomation about appContainerLogging.  There is a ContextJNDISelector in
the log4j-sandbox and a similar one exists in log4j-1.3 which is even
easier to use.

In all cases, you can use something like LogWeb to perform configuration
at runtime and even upload config files to it.  It's really quite slick.


Jake

Quoting James Stauffer <[EMAIL PROTECTED]>:

> If both your app server and application use log4j with different 
> configs I am not sure how to set it up.  If you want to use the same 
> config file for both then move the config and jar to one common place 
> (on Tomcat that is common/classes/log4j.properties and 
> common/lib/log4j.jar).  What happens if you remove 
> C:\Sun\AppServer\domains\domain1\lib\log4j.jar. ?
>
> On 10/21/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > Bizarre...I started the thread "Log4j not working" but Damodar(or
> > dyemme) seems to have answered for me but he's using Tomcat.
> >
> > So James, in answer to your question to me, log4j is in 
> > C:\Projects\PBTV\war\WEB-INF\lib\log4j-1.2.9.jar along with my 
> > app-specific jars. There is also one in the app server, 
> > C:\Sun\AppServer\domains\domain1\lib\log4j.jar.
> >
> > Obviously I want to pick up the one in WEB-INF\lib first and use 
> > that.
> >
> > Still don't understand why log4j didn't pick up the log4j.properties

> > file in Web-INF\classes even though it says it went to look 
> > there.....
> >
> > Rakesh
> >
> > -----Original Message-----
> > From: James Stauffer [mailto:[EMAIL PROTECTED]
> > Sent: 20 October 2005 19:54
> > To: Log4J Users List
> > Subject: Re: Log4j not working
> >
> >
> > Where is your log4j.jar?
> >
> > On 10/20/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > > Added debug to the App server and here's what it found:
> > >
> > > log4j: Trying to find [log4j.xml] using 
> > > ClassLoader.getSystemResource().|#]
> > >
> > > [#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.
> > > ente
> > > rp
> > > rise.system.stream.out|_ThreadID=12;|
> > > log4j: Trying to find [log4j.properties] using context classloader

> > > WebappClassLoader
> > >   delegate: true
> > >   repositories:
> > >     /WEB-INF/classes/
> > > ----------> Parent Classloader:
> > > EJBClassLoader :
> > > urlSet = []
> > > doneCalled = false
> > >  Parent -> [EMAIL PROTECTED]
> > >
> > > .|#]
> > >
> > > [#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.
> > > ente
> > > rp
> > > rise.system.stream.out|_ThreadID=12;|
> > > log4j: Using URL
> > >
> > [jar:file:/C:/Sun/AppServer/domains/domain1/lib/jaxr-ebxml.jar!/log4
> > j.pr
> > > operties] for automatic log4j configuration.|#]
> > >
> > > [#|2005-10-20T18:02:59.968+0100|INFO|sun-appserver-pe8.1_01|javax.
> > > ente
> > > rp
> > > rise.system.stream.out|_ThreadID=12;|
> > > log4j: Reading configuration from URL
> > >
> > jar:file:/C:/Sun/AppServer/domains/domain1/lib/jaxr-ebxml.jar!/log4j
> > .pro
> > > perties|#]
> > >
> > > So why does it not find the log4j.properties file in 
> > > /WEB-INF/classes/??
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > American Express Investments and American Express Independent 
> > Financial
> Advisers are marketing names for American Express Financial Services 
> Europe Limited, a separate corporation within the American Express 
> group of companies.  American Express Financial Services Europe 
> Limited is authorised and regulated by, and is entered into the 
> register (No. 190853
> www.fsa.gov.uk/register/) of, the Financial Services Authority and a
member
> of the London Stock Exchange. Registered in England No. 3614902.
Registered
> address: 230 Blackfriars Road, London SE1 8NW. Vat No. 740 4143 68.
> >
> > The information in this email and any attachments is confidential 
> > and
> intended solely for the attention and use of the named addressee(s). 
> It may be subject to legal, professional or other privilege and 
> further distribution of it is strictly prohibited without our 
> authority.  If you are not the intended recipient, you are not 
> authorised to and must not disclose, copy, distribute, or retain this 
> message or any part of it, and should notify us immediately.
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



American Express Investments and American Express Independent Financial
Advisers are marketing names for American Express Financial Services
Europe Limited, a separate corporation within the American Express group
of companies.  American Express Financial Services Europe Limited is
authorised and regulated by, and is entered into the register (No.
190853 www.fsa.gov.uk/register/) of, the Financial Services Authority
and a member of the London Stock Exchange. Registered in England No.
3614902. Registered address: 230 Blackfriars Road, London SE1 8NW. Vat
No. 740 4143 68. 

The information in this email and any attachments is confidential and
intended solely for the attention and use of the named addressee(s). It
may be subject to legal, professional or other privilege and further
distribution of it is strictly prohibited without our authority.  If you
are not the intended recipient, you are not authorised to and must not
disclose, copy, distribute, or retain this message or any part of it,
and should notify us immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



American Express Investments and American Express Independent Financial
Advisers are marketing names for American Express Financial Services
Europe Limited, a separate corporation within the American Express group
of companies.  American Express Financial Services Europe Limited is
authorised and regulated by, and is entered into the register (No.
190853 www.fsa.gov.uk/register/) of, the Financial Services Authority
and a member of the London Stock Exchange. Registered in England No.
3614902. Registered address: 230 Blackfriars Road, London SE1 8NW. Vat
No. 740 4143 68. 

The information in this email and any attachments is confidential and
intended solely for the attention and use of the named addressee(s). It
may be subject to legal, professional or other privilege and further
distribution of it is strictly prohibited without our authority.  If you
are not the intended recipient, you are not authorised to and must not
disclose, copy, distribute, or retain this message or any part of it,
and should notify us immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



American Express Investments and American Express Independent Financial 
Advisers are marketing names for American Express Financial Services Europe 
Limited, a separate corporation within the American Express group of companies. 
 American Express Financial Services Europe Limited is authorised and regulated 
by, and is entered into the register (No. 190853 www.fsa.gov.uk/register/) of, 
the Financial Services Authority and a member of the London Stock Exchange. 
Registered in England No. 3614902. Registered address: 230 Blackfriars Road, 
London SE1 8NW. Vat No. 740 4143 68. 

The information in this email and any attachments is confidential and intended 
solely for the attention and use of the named addressee(s). It may be subject 
to legal, professional or other privilege and further distribution of it is 
strictly prohibited without our authority.  If you are not the intended 
recipient, you are not authorised to and must not disclose, copy, distribute, 
or retain this message or any part of it, and should notify us immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to