James Bucanek wrote:
Greetings,
I finally got some free time to play with James today. Downloaded the 2.1 binary, configured James as a relay for my local LAN clients, and it fired it up. So far, so good.
Wrote a Mailet and a Matcher. The Matcher looks for certain CC addresses and the Mailet adds a Reply-To header. Compiled them and stuffed them in a JAR.
Added the <mailet> tag to the root processors. Add the package names to the <mailetpackages> and <matcherpackages>.
Sounds reasonable.
Now here's where it goes south:
:-)
According to the docks, I need to copy my JAR file into the james-2.1/lib directory. It also says that I have to unpack the james.sar file and drop in copies of james.jar and mail_1_2.jar into the same directory.
Something wrong in the above.
If you have a bind distribution then you already have a jamesXXX.sar file.This is basically a zip archive that holds info for the the Phoenix container plus jar files. Included in the sar file are a few jar file including jamesXXX.jar, mailet_X-X.jar, activation.jar, etc. If Phoenix has already deplyed a jamesXXX.sar, then somewhere or other wyou will find an equivalent directory with the content unpacked. In that directory you will probably find a directoy /lib - and that's the directory you should probably include you mail jar files. Please not that this is totally diofferent to the Phoenix /lib directory which basically contains jar file needed to tun Phoneix (the container). which has nothing to with mailet execution.
- If I copy james.jar and/or mail_1_2.jar into the james-2.1/lib directory, Phoenix throws an NoClassDefFound error and won't start. It says that there may be more info in the log, but there is nothing in the phoenix.log about the problem.
No suprised - james.jar has lots of dependecies which are unknown relative to the jar file in the phoenix .lib directiory that you putting things into. The directory you need to play with is the james-2.1/apps/jamesXXX/lib or something like that (its been over a year since I played with James in Phoenix).
- If I remove the james.jar and mail_1_2.jar files from james-2.1/lib AND comment out my new <mailet> tag, James starts right up again.
Yep - because you have removed the issue from Phoenix. Phoenix is looking at james.jar in james-2./lin and assuming it is par of the ciontainer implementation and trying to load it and discovering all sort of problems. You remove it and the problems dissapears. Put in in james-2.1/apps/jamesXXX/li and you will have a better chancve of success.
- If I leave out the james.jar and mail_1_2.jar files and try to put my <mailet> tag back in, James throws a ton of errors, starting with a LifecycleException: Component named "spoolmanager" failed to pass through the initialization stage. (Reason: java.lang.NoClassDefFoundError)
Because you have configrured a mailet but you classes are not in james-2.1/apps/jamesXXX/lib - therfore class not found when James reads the config (but I'm just guesing here).
Question: Am I putting the correct JARs in the correct place?
Anserer: no authorative ... no.
Question: Could there be some problem with my Matcher or Mailet? If I were throwing Errors on init(), how would that manifest itself?
Forget about Matcher/Mailet issues for the moment - your content is not even loading. First step is to get you jars in the right places. After that is sorted - then worry about minor details.
At this point I'm a bit baffled as to what to do. I can't seem to find a combination of jars and tags that lets me load my mailet classes. I've reread the docs about half a dozen times. So either I'm misreading something, or the answer isn't in there.
1. get james running withou your stuff
2. locate the directory that Phoenix is putting the cached jar file that were in james.ar
3. add you stuff to that directory (in /lib)
4. play around with configs
5. post another message here is things don't work out
Cheer, Stephen.
Help, tips, and suggestions welcome.
James
______________________________________________________ James Bucanek <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
