[ grinder-Bugs-2314157 ] Log4j classes reloaded by IsolatingClassLoader

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.grinder.devel
Message-ID <[email protected]>
Bugs item #2314157, was opened at 2008-11-19 06:34
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=2314157&group_id=18598

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core engine
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Fei Fan (sartrevan)
Assigned to: Philip Aston (philipa)
Summary: Log4j classes reloaded by IsolatingClassLoader

Initial Comment:
I use Grinder 3.1, GrinderStone 2.0 and PyDev 1.3.22 in Eclipse 3.4.1. I've used log4j in my test project to output running logs. Things go well with normal running. But when I started the test run in debug mode, which will casue the Grinder to run in single process mode. log4j classes seems to be reloaded by net.grinder.util.IsolatingClassLoader. It will cause log4j to fail initializing:
08-11-19 14:27:28 (agent): The Grinder 3.1
08-11-19 14:27:28 (agent): DEBUG MODE: Spawning threads rather than processes
08-11-19 14:27:28 (agent): WARNING grinder.jvm.arguments (-Xmx256m) ignored in single process mode
08-11-19 14:27:28 (agent): worker CN-PC-HZ2110-0 started
08-11-19 14:27:28 (process CN-PC-HZ2110-0): INFO: Starting new GrinderStone Debug process...
08-11-19 14:27:29 (process CN-PC-HZ2110-0): starting threads
08-11-19 14:27:29 (thread 0 run 0): INFO: Start debugging main script...
08-11-19 14:27:29 (thread 0 run 0): INFO: Grinder debugger is started.
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [net.grinder.util.IsolatingClassLoader@bf32c] whereas object of type 
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [sun.misc.Launcher$AppClassLoader@19821f].
log4j:ERROR Could not instantiate appender named "stdout".
log4j:ERROR A "org.apache.log4j.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [net.grinder.util.IsolatingClassLoader@bf32c] whereas object of type 
log4j:ERROR "org.apache.log4j.FileAppender" was loaded by [sun.misc.Launcher$AppClassLoader@19821f].

After examing the code of IsolatingClassLoader, it seems the classes other than the shared ones will be reloaded. A walk around is to modify the caller  net.grinder.engine.agent.DebugThreadWorker to include "org.apache.log4j.*" in its SHARED_CLASSES set:

  private static final String[] SHARED_CLASSES = {
    IsolateGrinderProcessRunner.class.getName(),
    "org.apache.log4j.*",
  };




----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 16:02

Message:
this post is fantastic <a href=" http://www.fiql.com/blogs/suysubo695
">joss stone at freeones</a>  ivfabc <a href="
http://www.fiql.com/blogs/ajejyri774 ">freeones emilee parker</a>  8-((( <a
href=" http://www.fiql.com/blogs/kataefy504 ">victoria valentino freeones
gallery</a>  >:-]] <a href=" http://www.fiql.com/blogs/nurao304 ">real
redhead doggy free ones</a>  pyu <a href="
http://www.fiql.com/blogs/edigiic887 ">bondage xana star freeones</a> 
141625 <a href=" http://www.fiql.com/blogs/jirigy576 ">freeones forum nikki
knockers</a>  29021 <a href=" http://www.fiql.com/blogs/uhony217 ">ello
sommers freeones</a>  2334 <a href=" http://www.fiql.com/blogs/caaqyp799
">intracial at free ones</a>  424931 <a href="
http://www.fiql.com/blogs/eguedo908 ">freeones shay lauren</a>  :-(( <a
href=" http://www.fiql.com/blogs/docubu202 ">itssarahtime freeones
board</a>  ula <a href=" http://www.fiql.com/blogs/tybage596 ">latin spice
freeones</a>  dhw <a href=" http://www.fiql.com/blogs/oconapy186 ">anna
malle pics freeones</a>  498 <a href=" http://www.fiql.com/blogs/sedemyq811
">tiffny rayne freeones</a>  8-DD <a href="
http://www.fiql.com/blogs/yfyheyj922 ">free ones bullitin board haley
berry</a>  ans <a href=" http://www.fiql.com/blogs/qyriju880 ">freeones
saphire rae</a>  >:(( <a href=" http://www.fiql.com/blogs/aiqy966 ">clara
morgane freeones</a>  hvubiy <a href=" http://www.fiql.com/blogs/oketofa553
">freeones nelli hunter</a>  =]]] <a href="
http://www.fiql.com/blogs/inikul938 ">jazmine cashmere at freeones</a>  %O
<a href=" http://www.fiql.com/blogs/rebuhoh152 ">jennifer brock at
freeones</a>  dmid <a href=" http://www.fiql.com/blogs/yhejep863 ">avy lee
roth free ones</a>  shsoqk 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 16:02

Message:
Very funny pictures <a href=" http://www.fiql.com/blogs/afeyce826
">danielle richardson freeones</a>  :-OOO <a href="
http://www.fiql.com/blogs/arisep964 ">freeones inbedwithashley</a>  49168
<a href=" http://www.fiql.com/blogs/ajejyri774 ">nicole moore movie
freeones</a>  vtbi <a href=" http://www.fiql.com/blogs/ugilu230 ">nina
jaymes freeones board</a>  16809 <a href="
http://www.fiql.com/blogs/ahuoki321 ">ann harlow at freeones</a>  jfvnu <a
href=" http://www.fiql.com/blogs/edigiic887 ">shirley jones at freeones</a>
 8DDD <a href=" http://www.fiql.com/blogs/jirigy576 ">sandra otterson
freeones</a>  810 <a href=" http://www.fiql.com/blogs/dikilyp702 ">kathleen
lancaster freeones</a>  bohfzt <a href="
http://www.fiql.com/blogs/nygeru932 ">alexa may freeones</a>  4248 <a
href=" http://www.fiql.com/blogs/laea594 ">ava dawn freeones thread</a> 
rbof <a href=" http://www.fiql.com/blogs/oconapy186 ">oc girls at
freeones</a>  960934 <a href=" http://www.fiql.com/blogs/uhedij527
">freeones iva</a>  252825 <a href=" http://www.fiql.com/blogs/kipyfel419
">erica rose campbell freeones</a>  86670 <a href="
http://www.fiql.com/blogs/aoyha715 ">michelle maylene freeones</a>  :D <a
href=" http://www.fiql.com/blogs/yfyheyj922 ">board freeones mistress
jessica</a>  44363 <a href=" http://www.fiql.com/blogs/elikysy129 ">wwe
freeones</a>  00885 <a href=" http://www.fiql.com/blogs/amecey543 ">mayson
moore freeones</a>  354866 <a href=" http://www.fiql.com/blogs/sabikue278
">lachelle marie at freeones bulletin board</a>  256063 <a href="
http://www.fiql.com/blogs/pibaud116 ">nadia moore free ones</a>  331614 <a
href=" http://www.fiql.com/blogs/laqitip236 ">freeones nappy</a>  hcpk 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 16:02

Message:
 <a href=" http://www.fiql.com/blogs/afeyce826 ">carmella diamond freeones
bulletin board</a>  =-OO <a href=" http://www.fiql.com/blogs/arisep964
">freeones audrina patridge</a>  =-P <a href="
http://www.fiql.com/blogs/sajae116 ">sierra lust freeones</a>  uzlfzz <a
href=" http://www.fiql.com/blogs/afegyi295 ">freeones con</a>  960 <a
href=" http://www.fiql.com/blogs/edigiic887 ">freeones lexi powered by
phpbb</a>  %)) <a href=" http://www.fiql.com/blogs/laea594 ">brittany
o'connell free ones</a>  %-] <a href=" http://www.fiql.com/blogs/eguedo908
">freeones forum nina hartley</a>  :] <a href="
http://www.fiql.com/blogs/docubu202 ">terry nova freeones</a>  >:-[ <a
href=" http://www.fiql.com/blogs/ebudyfu606 ">keira knightley at
freeones</a>  717663 <a href=" http://www.fiql.com/blogs/tyjaji647 ">carmen
freeones forum</a>  70872 <a href=" http://www.fiql.com/blogs/isyhaca857
">kendal brooks freeones</a>  efoc <a href="
http://www.fiql.com/blogs/kipyfel419 ">erica rose campbell freeones</a> 
qhwxf <a href=" http://www.fiql.com/blogs/yfyheyj922 ">freeones board
mistyanderson</a>  796 <a href=" http://www.fiql.com/blogs/sedemyq811
">ayana angel at freeones</a>  8[ <a href="
http://www.fiql.com/blogs/sabikue278 ">freeones foxy angel</a>  290075 <a
href=" http://www.fiql.com/blogs/komalo515 ">sydeney freeones</a>  159833
<a href=" http://www.fiql.com/blogs/pibaud116 ">jena haze freeones</a> 
%]]] <a href=" http://www.fiql.com/blogs/gipakau250 ">laura croft
freeones</a>  06017 <a href=" http://www.fiql.com/blogs/inikul938 ">jayme
langford freeones</a>  %-) <a href=" http://www.fiql.com/blogs/yhejep863
">masha lynn freeones</a>  >:OO 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 15:26

Message:
this post is fantastic <a href=" http://obemedodefehi397.vidilife.com
">lolita top list</a>  pdmvm <a href=" http://ehoecirafi814.vidilife.com
">teen lolita</a>  uin <a href=" http://ilehenojy287.vidilife.com ">bbs
lolita</a>  55236 <a href=" http://oefonufu180.vidilife.com ">lolita
mpegs</a>  =(( <a href=" http://komiejinipub851.vidilife.com ">little
lolita</a>  %-O <a href=" http://bynutyle546.vidilife.com ">mejores
lolitas desnudas en moteles</a>  632 <a href="
http://uafuhon216.vidilife.com ">top lolita sites</a>  1577 <a href="
http://ehaopumio412.vidilife.com ">top lolita</a>  =] <a href="
http://hykijyqyhe478.vidilife.com ">preteen lolita models</a>  44862 <a
href=" http://kuamaita977.vidilife.com ">naked lolitas</a>  66434 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 15:26

Message:
Punk not dead  <a href=" http://obemedodefehi397.vidilife.com ">lolita top
list</a>  =-]]] <a href=" http://umyneqybula504.vidilife.com ">lolita
galleries</a>  68702 <a href=" http://fececige614.vidilife.com ">lolita
preteen</a>  :PP <a href=" http://dojaohatate615.vidilife.com ">dark
lolita</a>  373405 <a href=" http://gyacacajoc689.vidilife.com ">lolitas
toplist</a>  %PP <a href=" http://hetyasohony228.vidilife.com ">best
lolita sites</a>  cqyz <a href=" http://komiejinipub851.vidilife.com
">little lolita</a>  86529 <a href=" http://bidadiqudu732.vidilife.com
">top 100 lolita sites</a>  ohhy <a href="
http://ofutofily727.vidilife.com ">lolita topsites</a>  vsar <a href="
http://hykijyqyhe478.vidilife.com ">preteen lolita models</a>  fbaq 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-05 15:26

Message:
Hello good day <a href=" http://ebihinymu174.vidilife.com ">shy lolita</a>
 6619 <a href=" http://ehoecirafi814.vidilife.com ">teen lolita</a> 
laoypb <a href=" http://kuhymilulor179.vidilife.com ">lolita art</a> 
16536 <a href=" http://gyacacajoc689.vidilife.com ">lolitas toplist</a> 
izp <a href=" http://uhemeraquqibe476.vidilife.com ">young lolita</a> 
dmvrz <a href=" http://aiteyfebo214.vidilife.com ">lolita teen</a>  :[ <a
href=" http://bidadiqudu732.vidilife.com ">top 100 lolita sites</a> 
eowtcf <a href=" http://unusygoqokoru276.vidilife.com ">great lolita
bbs</a>  cxktlx <a href=" http://unolyqygahyle788.vidilife.com ">lolita
links</a>  >:-DDD <a href=" http://kuamaita977.vidilife.com ">naked
lolitas</a>  bkccu 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2010-08-03 06:47

Message:
42IiiR http://fgb7s3Ffjsev7yrbvqqcf7.com

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-03-19 12:25

Message:
lM1uxY  <a href="http://omhftxecoaeo.com/">omhftxecoaeo</a>,
[url=http://chkrtyaebapz.com/]chkrtyaebapz[/url],
[link=http://iewuymnhurko.com/]iewuymnhurko[/link],
http://semmdcamjjqu.com/

----------------------------------------------------------------------

Comment By: SourceForge Robot (sf-robot)
Date: 2008-12-24 02:20

Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 30 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-11-23 14:43

Message:
I've attached a patch jar if you want to try this out. Put the patch first
in your CLASSPATH, then set

grinder.debug.singleprocess.sharedclasses=org.apache.log4j.*

in your grinder.properties.

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-11-23 14:40

Message:
Implemented -
http://grinder.svn.sourceforge.net/viewvc/grinder?view=rev&revision=3947

----------------------------------------------------------------------

Comment By: Philip Aston (philipa)
Date: 2008-11-22 15:01

Message:
I plan to address this by providing a grinder property that allows you to
add additional classes that should be isolated. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=2314157&group_id=18598

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.