[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    RE: Problems using Log4j on WebSphere 5.0 on Win2K
From:       "Tarek M. Nabil" <Tarek.Nabil () itworx ! com>
Date:       2003-07-27 15:01:58
[Download RAW message or body]

Thomas, it worked. Thanks a million :)

You can not imagine how tight the default security configuration is, I'm attaching \
the was.policy file that I added in order to get log4j to work.

/* AUTOMATICALLY GENERATED ON Sun Jul 27 17:14:12 EEST 2003*/
/* DO NOT EDIT */

grant codeBase "file:${application}" {
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
};


-----Original Message-----
From: Thomas Marsh [mailto:marsht1@nitesco.com]
Sent: Wednesday, July 23, 2003 4:11 AM
To: Log4J Users List
Subject: Re: Problems using Log4j on WebSphere 5.0 on Win2K


"Tarek M. Nabil" wrote:
> 
> Hi,
> 
> Sorry for the nagging, but does any one have a clue of what's happening here?
> 
> -----Original Message-----
> From: Tarek M. Nabil
> Sent: Sunday, July 20, 2003 1:50 PM
> To: 'Log4J Users List'
> Subject: RE: Problems with WebSphere 5.0 on Win2K
> 
> Thomas,
> 
> Thank you very much for your reply.
> 
> 1- The log4j jar is in the WEB-INF/lib directory of the war that I added to the ear \
> using the application assembly tool of WebSphere. 
> 2- No, it's not. I didn't know I had to do that! Do you think that's what causing \
> the problem? Struts.jar works fine, although it's in the same place and not \
> mentioned in in manifest files. 
> 3- The log4j.properties is located in the WEB-INF/classes directory of the war.
> 
> Thanks again,
> Tarek Nabil
> 
> -----Original Message-----
> From: Thomas Lionel SMETS [mailto:tsmets@altern.org]
> Sent: Saturday, July 19, 2003 1:56 AM
> To: Log4J Users List
> Subject: Re: Problems with WebSphere 5.0 on Win2K
> 
> I think the questions you have to reply are :
> 1°. Is the log4J.jar part of your war / ear / ... ?
> I would thnk not & the ClassLoader is forbidden by the Security
> manager to read a file outside his archive.
> 2°. Otherwise is the log4j.jar well published in the MANIFEST file ?
> 3°. Were is you log4j.properties loacated ... on the FS ... ?
> In the Classpath, in the war/ear ?
> 
> Cheers,
> 
> \T,
> 
> Tarek M. Nabil wrote:
> 
> > Hi everyone,
> > 
> > I developed an application Tomcat 4 and now I'm deploying it on
> > WebSphere 5.0 on Win2K.
> > 
> > Among the several problems I'm facing is getting log4j to work. I don't
> > know what's going on, it seems that the security in WebSphere comes
> > preconfigured in a way that doesn't permit log4j to work.
> > 
> > The log file is never created, and I get a million and one of those
> > errors
> > 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R log4j:WARN Caught Exception \
> > while in Loader.getResource. This may be innocuous.
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R \
> > java.lang.reflect.InvocationTargetException: \
> > java.security.AccessControlException: access denied (java.lang.RuntimePermission \
> > getClassLoader)
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled \
> > Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.security.AccessController.checkPermission(AccessController.java(Compiled \
> > Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java(Compiled \
> > Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.lang.Thread.getContextClassLoader(Thread.java(Compiled Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.lang.reflect.Method.invoke(Native Method) [7/17/03 21:53:13:575 EEST]  \
> > 7d25145 SystemErr     R   at \
> > org.apache.log4j.helpers.Loader.getTCL(Loader.java:136) [7/17/03 21:53:13:575 \
> > EEST]  7d25145 SystemErr     R   at \
> > org.apache.log4j.helpers.Loader.getResource(Loader.java:74) [7/17/03 21:53:13:575 \
> > EEST]  7d25145 SystemErr     R   at \
> > org.apache.log4j.LogManager.<clinit>(LogManager.java:96) [7/17/03 21:53:13:575 \
> > EEST]  7d25145 SystemErr     R   at \
> > org.apache.log4j.Logger.getLogger(Logger.java:94) [7/17/03 21:53:13:575 EEST]  \
> > 7d25145 SystemErr     R   at standish.charm.web.FlowFilter.<init>(Unknown Source) \
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.lang.Class.newInstance0(Native Method) [7/17/03 21:53:13:575 EEST]  7d25145 \
> > SystemErr     R   at java.lang.Class.newInstance(Class.java(Compiled Code)) \
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > java.beans.Beans.instantiate(Beans.java:233) [7/17/03 21:53:13:575 EEST]  7d25145 \
> > SystemErr     R   at java.beans.Beans.instantiate(Beans.java:77) [7/17/03 \
> > 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:294)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:160)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:209)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled \
> > Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled \
> > Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
> > 
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
> 
> > [7/17/03 21:53:13:575 EEST]  7d25145 SystemErr     R   at \
> > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
> 
> > [7/17/03 21:53:13:606 EEST]  7d25145 SystemErr     R log4j:WARN No appenders \
> > could be found for logger (standish.charm.web.FlowFilter).
> 
> > [7/17/03 21:53:13:606 EEST]  7d25145 SystemErr     R log4j:WARN Please initialize \
> > the log4j system properly. 
> > Any help is appreciated
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

this is just a shot in the dark, but look at article:

http://publib7b.boulder.ibm.com/wasinfo1/en/info/aes/ae/tsec_waspolicy.html


-- 
Tom Marsh

mailto:marsht1@nitesco.com
http://www.nitesco.com



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic