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 ts...@nildram.co.uk on 2003/01/13 14:29:39 UTC

Custom Mailet Installation Question

Hi,

I've just developed a simple mailet stub which just does System.out.println() for now.  I can't get it to work, because James doesn't seem to be able to find my implementation class.

I've built a jar of my class, copied it into the source distribution, rebuild the sar, copied the sar to a directory containing the non source distribution of james, and then changed the configuration file config.xml to have my package name as mailetpackage and added the mailet into the transport bit with the following XML:

<mailet match="All" class="XmlMailProcessorMailet"/>

What have I missed?  Do I need to do anything else?  The error is 

C:\james-2.1\bin>run
Using PHOENIX_HOME:   C:\james-2.1
Using PHOENIX_TMPDIR: C:\james-2.1\temp
Using JAVA_HOME:      c:\jdk1.3.1

Phoenix 4.0.1

James 2.1
Unable to init mailet XmlMailProcessorMailet
Check spool manager logs for more details.
org.apache.mailet.MailetException: Could not load mailet (XmlMailProcessorMailet);
  nested exception is:
        java.lang.NullPointerException
        at org.apache.james.transport.MailetLoader.getMailet(MailetLoader.java
:100)
        at org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolM
anager.java:213)
        at 

Platform is Windows NT.

thanks,

Tim.



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


RE: Hotspot server switch

Posted by Danny Angus <da...@apache.org>.
Interesting..

I should try it again. Although it may relate to RH8 I'm using RH7.2.

> it seems to have no problem at all. I am using
> RedHat 8 on a Intel p3 866, 256 MB RAM machine with
> JDK 1.4.1


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


RE: Hotspot server switch

Posted by Siraj Shakil <sh...@yahoo.com>.
Hi,

Thanks for your reply. I have set 

JVM_OPTS="-server -verbose:gc
-Djava.ext.dirs=$PHOENIX_HOME/lib"

and it seems to have no problem at all. I am using
RedHat 8 on a Intel p3 866, 256 MB RAM machine with
JDK 1.4.1

Thanks again.

Best regards, Shakil
--- Danny Angus <da...@apache.org> wrote:
> Unfortunately my experience is that James doesn't
> run under -server, set it
> in the phoenix.sh shell script, it dies inexplicably
> after a short time.
> 
> I don't know what is causing this.
> 
> d.
> 
> > -----Original Message-----
> > From: Siraj Shakil [mailto:shakilsiraj@yahoo.com]
> > Sent: 14 January 2003 08:44
> > To: James Users List
> > Subject: Hotspot server switch
> >
> >
> > Hello guys,
> >
> > where do i set Sun's JVM HotSpot server switch(
> > -server ) in the run.sh file? Or is it set by
> default?
> > I am using JDK 1.4.1
> >
> > Thanks in advance.
> >
> > Regards, Shakil
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > http://mailplus.yahoo.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>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


RE: Hotspot server switch

Posted by Danny Angus <da...@apache.org>.
Unfortunately my experience is that James doesn't run under -server, set it
in the phoenix.sh shell script, it dies inexplicably after a short time.

I don't know what is causing this.

d.

> -----Original Message-----
> From: Siraj Shakil [mailto:shakilsiraj@yahoo.com]
> Sent: 14 January 2003 08:44
> To: James Users List
> Subject: Hotspot server switch
>
>
> Hello guys,
>
> where do i set Sun's JVM HotSpot server switch(
> -server ) in the run.sh file? Or is it set by default?
> I am using JDK 1.4.1
>
> Thanks in advance.
>
> Regards, Shakil
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.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>


Hotspot server switch

Posted by Siraj Shakil <sh...@yahoo.com>.
Hello guys,

where do i set Sun's JVM HotSpot server switch(
-server ) in the run.sh file? Or is it set by default?
I am using JDK 1.4.1

Thanks in advance.

Regards, Shakil

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


RE: Custom Mailet Installation Question

Posted by "Noel J. Bergman" <no...@devtech.com>.
Tim,

The easiest thing for you to do until James v3 with custom loaders is to
take the source distribution, add your custom mailet to
org.apache.james.transport.mailets, and build.

	--- Noel


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


Re: Custom Mailet Installation Question

Posted by Siraj Shakil <sh...@yahoo.com>.
Hi,

I had the same problem with James on RedHat 8, could
not make the recompiled SAR file to work. I tried the
second approach as described at the Apache website,
and it worked. 

So here it is:
1. Copy your Jar file into lib directory of James.
2. Copy Javamail, activation to the the same folder. U
might see some error messages that 'some' class is not
found. If so then copy the jar to lib folder.
3. In the apps/james/SAR-INF/config.xml file register
your mailet/matcher folder name under <mailetpackages>
node. You only need to mention the folder name in jar.

Now you will find the mailet is working.

Best regards,
Shakil

--- tsawyer@nildram.co.uk wrote:
> Hi,
> 
> I've just developed a simple mailet stub which just
> does System.out.println() for now.  I can't get it
> to work, because James doesn't seem to be able to
> find my implementation class.
> 
> I've built a jar of my class, copied it into the
> source distribution, rebuild the sar, copied the sar
> to a directory containing the non source
> distribution of james, and then changed the
> configuration file config.xml to have my package
> name as mailetpackage and added the mailet into the
> transport bit with the following XML:
> 
> <mailet match="All" class="XmlMailProcessorMailet"/>
> 
> What have I missed?  Do I need to do anything else? 
> The error is 
> 
> C:\james-2.1\bin>run
> Using PHOENIX_HOME:   C:\james-2.1
> Using PHOENIX_TMPDIR: C:\james-2.1\temp
> Using JAVA_HOME:      c:\jdk1.3.1
> 
> Phoenix 4.0.1
> 
> James 2.1
> Unable to init mailet XmlMailProcessorMailet
> Check spool manager logs for more details.
> org.apache.mailet.MailetException: Could not load
> mailet (XmlMailProcessorMailet);
>   nested exception is:
>         java.lang.NullPointerException
>         at
>
org.apache.james.transport.MailetLoader.getMailet(MailetLoader.java
> :100)
>         at
>
org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolM
> anager.java:213)
>         at 
> 
> Platform is Windows NT.
> 
> thanks,
> 
> Tim.
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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