You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Keith Chew <ke...@jungledrum.co.nz> on 2002/03/20 00:50:10 UTC

custom mailet installation

Hi

I wrote a simple Mailet but had difficulties installing it in James2.0a2.

I have 2 jars:
- custom-mailet.jar
- core.jar

I tried putting them in:
- dist\lib
- dist\apps\james\lib

but James could not find the mailet. Finally, I included the custom mailet
class in james.bar and it works. But it still cannot find core.jar, which
the custom mailet depends on.

Can someone point me to the right direction?
Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: custom mailet installation

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Hi Serge

I must be doing something right. Adding the jars in the dist\apps\james\lib
works.

I just forgot to include log4j.jar, which was required by core.jar.

Keith


-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Wednesday, 20 March 2002 3:34 p.m.
To: James Users List
Subject: Re: custom mailet installation


Keith Chew wrote:

>Hi
>
>I wrote a simple Mailet but had difficulties installing it in James2.0a2.
>
>I have 2 jars:
>- custom-mailet.jar
>- core.jar
>
>I tried putting them in:
>- dist\lib
>- dist\apps\james\lib
>
>but James could not find the mailet. Finally, I included the custom mailet
>class in james.bar and it works. But it still cannot find core.jar, which
>the custom mailet depends on.
>
>Can someone point me to the right direction?
>Keith
>
Right now James doesn't support any special classloaders, and the avalon
structure makes classloading rather ornery.  Unfortunately you have to
put ALL classes into the james.bar file.  So, extract it out of the
core.jar and add that and the custom mailet and it should work.  Yes,
this is a known limitation which greatly slows mailet development, and I
have a rough idea/half implementation to support a /classes and /lib
directory and be able to load mailets and supporting libraries from
there like a servlet container.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: custom mailet installation

Posted by Serge Knystautas <se...@lokitech.com>.
Keith Chew wrote:

>Hi
>
>I wrote a simple Mailet but had difficulties installing it in James2.0a2.
>
>I have 2 jars:
>- custom-mailet.jar
>- core.jar
>
>I tried putting them in:
>- dist\lib
>- dist\apps\james\lib
>
>but James could not find the mailet. Finally, I included the custom mailet
>class in james.bar and it works. But it still cannot find core.jar, which
>the custom mailet depends on.
>
>Can someone point me to the right direction?
>Keith
>
Right now James doesn't support any special classloaders, and the avalon 
structure makes classloading rather ornery.  Unfortunately you have to 
put ALL classes into the james.bar file.  So, extract it out of the 
core.jar and add that and the custom mailet and it should work.  Yes, 
this is a known limitation which greatly slows mailet development, and I 
have a rough idea/half implementation to support a /classes and /lib 
directory and be able to load mailets and supporting libraries from 
there like a servlet container.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: custom mailet installation

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Sorry guys! I can just kick myself!!

I forgot to include another library that is required.

Adding all the jars in the dist\apps\james\lib works.

Keith


-----Original Message-----
From: Keith Chew [mailto:keith.chew@jungledrum.co.nz]
Sent: Wednesday, 20 March 2002 3:27 p.m.
To: James Users List
Subject: RE: custom mailet installation



I still cannot get this to work with the CVS version.

I still have to include my TestMailet.class in the james.bar AND it still
cannot find the core.jar.

I am surprised that no one is having this problem. Is anyone creating
mailets using James?

Keith


-----Original Message-----
From: Keith Chew [mailto:keith.chew@jungledrum.co.nz]
Sent: Wednesday, 20 March 2002 11:50 a.m.
To: James Users List
Subject: custom mailet installation


Hi

I wrote a simple Mailet but had difficulties installing it in James2.0a2.

I have 2 jars:
- custom-mailet.jar
- core.jar

I tried putting them in:
- dist\lib
- dist\apps\james\lib

but James could not find the mailet. Finally, I included the custom mailet
class in james.bar and it works. But it still cannot find core.jar, which
the custom mailet depends on.

Can someone point me to the right direction?
Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: custom mailet installation

Posted by Keith Chew <ke...@jungledrum.co.nz>.
I still cannot get this to work with the CVS version.

I still have to include my TestMailet.class in the james.bar AND it still
cannot find the core.jar.

I am surprised that no one is having this problem. Is anyone creating
mailets using James?

Keith


-----Original Message-----
From: Keith Chew [mailto:keith.chew@jungledrum.co.nz]
Sent: Wednesday, 20 March 2002 11:50 a.m.
To: James Users List
Subject: custom mailet installation


Hi

I wrote a simple Mailet but had difficulties installing it in James2.0a2.

I have 2 jars:
- custom-mailet.jar
- core.jar

I tried putting them in:
- dist\lib
- dist\apps\james\lib

but James could not find the mailet. Finally, I included the custom mailet
class in james.bar and it works. But it still cannot find core.jar, which
the custom mailet depends on.

Can someone point me to the right direction?
Keith



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>