You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Srinivasarao Nandiwada <sr...@netscape.net> on 2002/04/12 20:41:13 UTC

Using log4j in an applet

Hi,

I am using log4j (V1.1.3) in an applet and works great except that I 
notice a strange behavior while loading the applet. I notice that applet 
is making connection to server and trying to retrieve a few class files 
other than log4j.jar (see below) and wondering whether any one has seen 
this behavior and know any fixes? My applet does not do anything other 
than displaying a "hello world" string and log the same.  I notice that 
loading of the applet takes about 35 to 40 seconds (server on same box 
running the browser). However, subsequent invocations (without closing 
the browser) take less than two seconds.

I don't see PatternLayoutBeanInfo class in log4j.jar and I greped in 
log4j sources, and didn't find it anywhere. For sure, I don't see these 
extra calls if I don't use log4j. Quite confused. Any help?

Thanks,
nsr

127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/jars/log4j.jar HTTP/1.1" 200 158892^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/log4j.properties HTTP/1.1" 400 751^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class 
HTTP/1.1" 400 835^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class 
HTTP/1.1" 400 835^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class 
HTTP/1.1" 400 832^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class 
HTTP/1.1" 400 832^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1" 
400 814^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1" 
400 814^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/sun/beans/infos/LayoutBeanInfo.class HTTP/1.1" 
400 811^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/java/lang/ObjectBeanInfo.class HTTP/1.1" 400 793^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET 
/campaignapp/do/campaign/sun/beans/infos/ObjectBeanInfo.class HTTP/1.1" 
400 811^M


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using log4j in an applet

Posted by Srinivasarao Nandiwada <sr...@netscape.net>.
Thanks adam. As you described, I notice these only during log4j 
initialization (once per VM). I wonder whether there is a way to tell 
Java not to look for these classes. Thanks again for your reply.

-nsr

ajack@openbiz.biz wrote:

> This is standard "bean" behaviour. These class are optional XXXBeanInfo
> classes for class XXX that *if* they are found/load can contain additional
> metadata about the bean. Log4J does not need that, but still Java does the
> attempt for them.
> 
> This isn't a bug, so I'd guess there is no fix. I doubt it'll cause you much
> problem (other than confusion) since it will only do it the first time your
> log4j configuration is loaded.
> 
> If you see it a lot, I'd worry that log4j is being configured "too
> often" ---------- hmm, I guess it will be, once per remote applet VM.
> Hmmm... interesting, good luck. :-)
> 
> regards
> 
> Adam
> -----Original Message-----
> From: Srinivasarao Nandiwada [mailto:srinivasaraon@netscape.net]
> Sent: Friday, April 12, 2002 12:41 PM
> To: log4j-user@jakarta.apache.org
> Subject: Using log4j in an applet
> 
> 
> Hi,
> 
> I am using log4j (V1.1.3) in an applet and works great except that I
> notice a strange behavior while loading the applet. I notice that applet
> is making connection to server and trying to retrieve a few class files
> other than log4j.jar (see below) and wondering whether any one has seen
> this behavior and know any fixes? My applet does not do anything other
> than displaying a "hello world" string and log the same.  I notice that
> loading of the applet takes about 35 to 40 seconds (server on same box
> running the browser). However, subsequent invocations (without closing
> the browser) take less than two seconds.
> 
> I don't see PatternLayoutBeanInfo class in log4j.jar and I greped in
> log4j sources, and didn't find it anywhere. For sure, I don't see these
> extra calls if I don't use log4j. Quite confused. Any help?
> 
> Thanks,
> nsr
> 
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/jars/log4j.jar HTTP/1.1" 200 158892^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/log4j.properties HTTP/1.1" 400 751^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class
> HTTP/1.1" 400 835^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class
> HTTP/1.1" 400 835^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class
> HTTP/1.1" 400 832^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class
> HTTP/1.1" 400 832^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1"
> 400 814^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1"
> 400 814^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/sun/beans/infos/LayoutBeanInfo.class HTTP/1.1"
> 400 811^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/java/lang/ObjectBeanInfo.class HTTP/1.1" 400 793^M
> 127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
> /campaignapp/do/campaign/sun/beans/infos/ObjectBeanInfo.class HTTP/1.1"
> 400 811^M
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Using log4j in an applet

Posted by ajack <aj...@openbiz.biz>.
This is standard "bean" behaviour. These class are optional XXXBeanInfo
classes for class XXX that *if* they are found/load can contain additional
metadata about the bean. Log4J does not need that, but still Java does the
attempt for them.

This isn't a bug, so I'd guess there is no fix. I doubt it'll cause you much
problem (other than confusion) since it will only do it the first time your
log4j configuration is loaded.

If you see it a lot, I'd worry that log4j is being configured "too
often" ---------- hmm, I guess it will be, once per remote applet VM.
Hmmm... interesting, good luck. :-)

regards

Adam
-----Original Message-----
From: Srinivasarao Nandiwada [mailto:srinivasaraon@netscape.net]
Sent: Friday, April 12, 2002 12:41 PM
To: log4j-user@jakarta.apache.org
Subject: Using log4j in an applet


Hi,

I am using log4j (V1.1.3) in an applet and works great except that I
notice a strange behavior while loading the applet. I notice that applet
is making connection to server and trying to retrieve a few class files
other than log4j.jar (see below) and wondering whether any one has seen
this behavior and know any fixes? My applet does not do anything other
than displaying a "hello world" string and log the same.  I notice that
loading of the applet takes about 35 to 40 seconds (server on same box
running the browser). However, subsequent invocations (without closing
the browser) take less than two seconds.

I don't see PatternLayoutBeanInfo class in log4j.jar and I greped in
log4j sources, and didn't find it anywhere. For sure, I don't see these
extra calls if I don't use log4j. Quite confused. Any help?

Thanks,
nsr

127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/jars/log4j.jar HTTP/1.1" 200 158892^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/log4j.properties HTTP/1.1" 400 751^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class
HTTP/1.1" 400 835^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/org/apache/log4j/PatternLayoutBeanInfo.class
HTTP/1.1" 400 835^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class
HTTP/1.1" 400 832^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/sun/beans/infos/PatternLayoutBeanInfo.class
HTTP/1.1" 400 832^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1"
400 814^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/org/apache/log4j/LayoutBeanInfo.class HTTP/1.1"
400 814^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/sun/beans/infos/LayoutBeanInfo.class HTTP/1.1"
400 811^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/java/lang/ObjectBeanInfo.class HTTP/1.1" 400 793^M
127.0.0.1 - - [12/Apr/2002:13:58:30 -0500] "GET
/campaignapp/do/campaign/sun/beans/infos/ObjectBeanInfo.class HTTP/1.1"
400 811^M


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>