james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Walsh" <james-...@nemonik.com>
Subject Odd class loader behavior
Date Tue, 19 Feb 2002 23:03:42 GMT
Oops, I bungled that last e-mail, please read this instead...

I'm having some really odd behavior for a mailet I've written.  As is typical, 
the mailet and its supporting classes is jar'ed up into the james block 
archive (james.bar).

A jar -tvf james.bar looks like so

.... cut short to get to the point ...

My myMailet extends GenericMailet, creates a FooHandler object that in turns 
creates a Foo object, who in turn creates a InfoFoo object, or that's the way 
things ought to work.  I should note that MyMailet, FooHandler, and Foo are 
all at the same package <org.nemonik.project>, where as InfoFoo is in the 
subpackage <org.nemonik.project.info>. This normally shouldn't be a problem, 
but for some reason it is here.  Note, InfoHandler does have the correct 
import directive  org.nemonik.project.info.InfoFoo.

By simply running James from the command-line I have no clue what is going on, 
since the the application continues to run, but just doesn't move on past the 
point of creating the InfoFoo object.

By running James as so

C:\james-2.0a2-20020128-src>\jdk1.3.1_01\bin\java -Xdebug 
-Djava.ext.dirs=C:\james-2.0a2-20020128-src\dist\lib  -jar 

I'm able to attach NetBeans' JPDA debugger across a shared memory into James 
and debug up until the attempted creation of the InfoFoo object, just as 
things get unhinged as java.lang.ClassLoader.checkPackageAccess is placed on 
the call stack.

I also put debugging code into InfoFoo, but the code never gets called, so it 
doesn't appear InfoFoo ever gets initialized.

Any pointers?  Am I missing something here, or have I completely lost 
something fundamental.


To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message