You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Vincenzo Gianferrari Pini <vi...@praxis.it> on 2003/05/13 15:55:27 UTC
RE: [no virus] Re: Size Manager - Exception in matchRecipient
Could you send also your config.xml file?
Vincenzo
> -----Original Message-----
> From: Marco Tedone [mailto:mtedone@jemos.org]
> Sent: martedì 13 maggio 2003 11.38
> To: James Developers List
> Subject: [no virus] Re: Size Manager - Exception in matchRecipient
>
>
> Vincenzo, the problem has been solved with the modify suggested
> by Noel, but
> there is another problem, which is that now the getStorageAllowed (and I
> presume because I didn't send a message to the spool) also the
> getStorageUsed methods are invoked several times if I just send
> ONE email to
> myself. It seems that matchRecipient is executed several times I
> don't know
> why. I'll have a look at it tonight. In the meantime, if you want the last
> code, you'll find it attached.
>
> Marco
> ----- Original Message -----
> From: "Vincenzo Gianferrari Pini" <vi...@praxis.it>
> To: "James Developers List" <ja...@jakarta.apache.org>
> Sent: Tuesday, May 13, 2003 10:17 AM
> Subject: RE: Size Manager - Exception in matchRecipient
>
>
> send your current source
>
> Vincenzo
>
> > -----Original Message-----
> > From: Marco Tedone [mailto:mtedone@jemos.org]
> > Sent: martedì 13 maggio 2003 11.02
> > To: James Developers List
> > Subject: Re: Size Manager - Exception in matchRecipient
> >
> >
> > Vincenzo, in the mailet logger I get the following exception:
> >
> > 13/05/03 09:53:45 INFO James.Mailet: AbstractQuotaXML:
> Exception checking
> > storage used for user: mtedone@jemos.org
> > java.lang.NullPointerException
> > at
> > org.apache.james.transport.matchers.AbstractQuotaMatcher.matchReci
> > pient(Abst
> > ractQuotaMatcher.java:38)
> > at
> > org.apache.mailet.GenericRecipientMatcher.match(GenericRecipientMa
> > tcher.java
> > :90)
> > at
> > org.apache.james.transport.LinearProcessor.service(LinearProcessor
> > .java:370)
> > at
> > org.apache.james.transport.JamesSpoolManager.process(JamesSpoolMan
> > ager.java:
> > 436)
> > at
> > org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager
> > .java:366)
> > at
> > org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute
> > (Executabl
> > eRunnable.java:47)
> > at
> > org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThr
> > ead.java:8
> > 0)
> >
> > it seems that the matchRecipient method returns a null value,
> > therefore the
> > getStorageAllowed(user) method in the matcher is not executed.
> I'll have a
> > look at it tonight.
> >
> > Marco
> > ----- Original Message -----
> > From: "Vincenzo Gianferrari Pini" <vi...@praxis.it>
> > To: "James Developers List" <ja...@jakarta.apache.org>
> > Sent: Tuesday, May 13, 2003 8:45 AM
> > Subject: RE: Size Manager - Exception in matchRecipient
> >
> >
> > >
> > > I enclose the two classes running at present as well.
> > >
> > > Marco
> > >
> >
> > Marco, a suggestion:
> >
> > In AbstractQuotaMatcher change
> > ...
> > public boolean matchRecipient(MailAddress recipient) throws
> > MessagingException {
> > String user = recipient.getUser();
> > return (!(context.isLocalServer(recipient.getHost()) &&
> > context.isLocalUser(user)))
> > || (getStorageUsed(user) <= getStorageAllowed(user));
> > }
> > ...
> >
> > to
> > ...
> > public boolean matchRecipient(MailAddress recipient) {
> > String user = recipient.getUser();
> > try {
> > return (!(context.isLocalServer(recipient.getHost()) &&
> > context.isLocalUser(user)))
> > || (getStorageUsed(user) <=
> getStorageAllowed(user));
> > } catch (Exception e) {
> > log("Exception checking storage used for user: " +
> recipient,
> > e);
> > return false;
> > }
> > }
> > ...
> >
> > This to be absolutely sure of the delivery of the message if any problem
> > arises anywhere.
> >
> > Vincenzo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org
Re: [no virus] Re: Size Manager - Exception in matchRecipient
Posted by Marco Tedone <mt...@jemos.org>.
Vincenzo, attached you will find my config file.
Regards,
Marco
----- Original Message -----
From: "Vincenzo Gianferrari Pini" <vi...@praxis.it>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Tuesday, May 13, 2003 2:55 PM
Subject: RE: [no virus] Re: Size Manager - Exception in matchRecipient
Could you send also your config.xml file?
Vincenzo
> -----Original Message-----
> From: Marco Tedone [mailto:mtedone@jemos.org]
> Sent: marted� 13 maggio 2003 11.38
> To: James Developers List
> Subject: [no virus] Re: Size Manager - Exception in matchRecipient
>
>
> Vincenzo, the problem has been solved with the modify suggested
> by Noel, but
> there is another problem, which is that now the getStorageAllowed (and I
> presume because I didn't send a message to the spool) also the
> getStorageUsed methods are invoked several times if I just send
> ONE email to
> myself. It seems that matchRecipient is executed several times I
> don't know
> why. I'll have a look at it tonight. In the meantime, if you want the last
> code, you'll find it attached.
>
> Marco
> ----- Original Message -----
> From: "Vincenzo Gianferrari Pini" <vi...@praxis.it>
> To: "James Developers List" <ja...@jakarta.apache.org>
> Sent: Tuesday, May 13, 2003 10:17 AM
> Subject: RE: Size Manager - Exception in matchRecipient
>
>
> send your current source
>
> Vincenzo
>
> > -----Original Message-----
> > From: Marco Tedone [mailto:mtedone@jemos.org]
> > Sent: marted� 13 maggio 2003 11.02
> > To: James Developers List
> > Subject: Re: Size Manager - Exception in matchRecipient
> >
> >
> > Vincenzo, in the mailet logger I get the following exception:
> >
> > 13/05/03 09:53:45 INFO James.Mailet: AbstractQuotaXML:
> Exception checking
> > storage used for user: mtedone@jemos.org
> > java.lang.NullPointerException
> > at
> > org.apache.james.transport.matchers.AbstractQuotaMatcher.matchReci
> > pient(Abst
> > ractQuotaMatcher.java:38)
> > at
> > org.apache.mailet.GenericRecipientMatcher.match(GenericRecipientMa
> > tcher.java
> > :90)
> > at
> > org.apache.james.transport.LinearProcessor.service(LinearProcessor
> > .java:370)
> > at
> > org.apache.james.transport.JamesSpoolManager.process(JamesSpoolMan
> > ager.java:
> > 436)
> > at
> > org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager
> > .java:366)
> > at
> > org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute
> > (Executabl
> > eRunnable.java:47)
> > at
> > org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThr
> > ead.java:8
> > 0)
> >
> > it seems that the matchRecipient method returns a null value,
> > therefore the
> > getStorageAllowed(user) method in the matcher is not executed.
> I'll have a
> > look at it tonight.
> >
> > Marco
> > ----- Original Message -----
> > From: "Vincenzo Gianferrari Pini" <vi...@praxis.it>
> > To: "James Developers List" <ja...@jakarta.apache.org>
> > Sent: Tuesday, May 13, 2003 8:45 AM
> > Subject: RE: Size Manager - Exception in matchRecipient
> >
> >
> > >
> > > I enclose the two classes running at present as well.
> > >
> > > Marco
> > >
> >
> > Marco, a suggestion:
> >
> > In AbstractQuotaMatcher change
> > ...
> > public boolean matchRecipient(MailAddress recipient) throws
> > MessagingException {
> > String user = recipient.getUser();
> > return (!(context.isLocalServer(recipient.getHost()) &&
> > context.isLocalUser(user)))
> > || (getStorageUsed(user) <= getStorageAllowed(user));
> > }
> > ...
> >
> > to
> > ...
> > public boolean matchRecipient(MailAddress recipient) {
> > String user = recipient.getUser();
> > try {
> > return (!(context.isLocalServer(recipient.getHost()) &&
> > context.isLocalUser(user)))
> > || (getStorageUsed(user) <=
> getStorageAllowed(user));
> > } catch (Exception e) {
> > log("Exception checking storage used for user: " +
> recipient,
> > e);
> > return false;
> > }
> > }
> > ...
> >
> > This to be absolutely sure of the delivery of the message if any problem
> > arises anywhere.
> >
> > Vincenzo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org