Similar problem I had but maybe not for the same reason.
My mailet couldnt go ahead after attempting creating another object.
What I did was join the second class stuff inside my custom mailet (no
two classes this time)....so everything was happening inside my mailet.
This made my mailet to through  exception in one of the logs which i could
then debug.
I think there is some exception happening somewhere but it dosent get
logged anywhere
if ur calling classes outside the mailet.

kishan






"Michael J. Walsh" <[EMAIL PROTECTED]> on 20/02/2002 10:05:29

Please respond to "James Users List" <[EMAIL PROTECTED]>

To:    james-user <[EMAIL PROTECTED]>
cc:

Subject:    Odd class loader behavior


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

org/
org/apache
org/apache/james/
.... cut short to get to the point ...
org/apache/james/util/SchedulerNotifyOutputStream.class
org/apache/james/util/SqlResources.class
org/nemonik/
org/nemonik/project/
org/nemonik/project/info/
org/nemonik/project/info/InfoFoo.class
org/nemonik/project/Foo.class
org/nemonik/project/FooHandler.class
org/nemonik/project/myMailet.class


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
-Xrunjdwp:transport=dt_shmem,server=y,suspend=y
-Djava.ext.dirs=C:\james-2.0a2-20020128-src\dist\lib  -jar
C:\james-2.0a2-20020128-src\dist\bin\phoenix-loader.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.

-Michael


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










****************************************************************
NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
****************************************************************

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

Reply via email to