Why are things such as SAR and BAR files?   I know they are just Java
Archive files, but it makes working with Avalon/Phoenix/James, etc. a
pain with an IDE because they only (AFAIK with IDEA) only recognize .JAR
files.  

After figuring this out, I ended up just making copies of the BAR, SAR
files and giving them JAR extensions (so the IDEA compiler wouldn't
complain).

Is there something I am missing here?  Is remote debugging the only way
to "cleanly" (and I use that term EXTREMELY loosely here) to compile and
debug a James project.  This means, not having to rename or copy
existing files that are shipped with James?

Tom
-----Original Message-----
From: Darrell DeBoer [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, December 08, 2002 7:01 PM
To: James Users List
Subject: Re: Debug startup of James

On Mon, 9 Dec 2002 08:08, Tom wrote:
> Darrell DeBoer <[EMAIL PROTECTED]> wrote:
> Basically all I am doing is trying to write a matcher/mailet that
> detects if an email comes to say, [EMAIL PROTECTED] I want to act
on
> it and have my Java mailet code take the complete email message and do
> something with (put it my own proprietary database).
>
> As my previous messages hints at, I still can't get James to run with
a
> sample someone posted yesterday.
>
> http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-jamesmail_p.html
>
> I followed this example as best I could, but ended up with the errors
I
> mentioned in my previous message.

Hi Tom,

Following the exact instructions in this article may *not* work with the

latest version of James, because the deployment structure is different. 
Phoenix no longer expands the entire SAR file at the time of first
running 
(like it used to), Now, Phoenix reads jar files directly from within the
SAR 
file, so you need to make sure that your jar file (with your mailet) is 
bundled in the James.sar file.

>From my last message:
>> As far as I'm aware, the only way to get your Mailet to run is to
bundle it
>> up into the James.sar file. You should be able to add your
MyMailet.jar to
>> the lib directory of James.sar, or just add the class files directly
to
>> James.jar. (I haven't tried the former, but it should work).
>>
>> Have a look at the "sar" target of build.xml to get an idea of how to
>> bundle everything into a sar file.
>>
>> I know this is a less than perfect solution, and probably something
we'll
>> want to address in James3.

>
> One more question regarding Phoenix do you any IDE for debugging (like
> JBuilder or IDEA)?  What do I exactly run when I want to debug James,
> but with Phoenix?  Is it a Phoenix project then?

I've debugged Phoenix in IDEA using remote debugging. To make this work
you 
need to do 2 things:
1) uncomment the lines in phoenix.sh (or phoenix.bat) that enable remote

debugging: ie
        rem uncomment to get enable remote debugging
        rem set DEBUG=-Xdebug 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

2) Set up your ide to remote debug, using the specified config. I'm sure
you 
can find details on how to set up remote debugging with your IDE on
google.

3) Oh, and you'll need to hope that Phoenix was compiled with debugging
info 
included. I haven't tried the jars that are in the latest version of
James. 
If they don't include debugging info, you'll need to build Phoenix 
yourself....

-- 
ciao,
Daz

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



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

Reply via email to