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 Raju Buchi <ra...@contentpilot.net> on 2011/06/29 01:20:16 UTC

Custom Mailets in mailetcontainer.xml

Hello

I have been using James 2.3.3 before and had a mailet configuration in the
config.xml

<!-- Set the Java packages from which to load mailets and matchers -->
   <mailetpackages>
      <mailetpackage>org.apache.james.transport.mailets</mailetpackage>

<mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
*<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
   </mailetpackages>
   <matcherpackages>
      <matcherpackage>org.apache.james.transport.matchers</matcherpackage>

<matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
*<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
   </matcherpackages>


Inside <processor name="root">, I had

<mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
<callbackurl>*http://url*</callbackurl>
</mailet>

This was used for tracking bounces where our application would track for
Soft/Hard bounces and create log. It worked fine in 2.3.2. I have recently
upgraded the server to 3.0.2. When I used the same

configuration above in the mailetcontainer.xml

I am getting an error when starting up James which say...

----------------------------------------
INFO  13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
INFO  13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
instantiated.
INFO  13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
instantiated.
INFO  13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException: Could not
load matcher (NewsletterBounceMatcher);
  nested exception is:
java.lang.ClassNotFoundException: Requested matcher not found:
NewsletterBounceMatcher.  Package searched:
 org.apache.james.transport.matchers.
org.apache.james.mailet.crypto.matchers.
org.apache.james.mailetcontainer.lib.matchers. com.abc.util.james.matcher.
org.apache.mailet.MailetException: Could not load matcher
(NewsletterBounceMatcher);
  nested exception is:
java.lang.ClassNotFoundException: Requested matcher not found:
NewsletterBounceMatcher.  Package searched:
 org.apache.james.transport.matchers.
org.apache.james.mailet.crypto.matchers.
org.apache.james.mailetcontainer.lib.matchers. com.abc.util.james.matcher.
at
org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
at
org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
at
org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
at
org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
at
org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
at
org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
-------------------------------------------------------

I am sure that there  is something something... Do I need to include any
library files? Do I have change the custom mailets to be compatible with the
new version of James?

Can anyone help me figuring this out. I have no idea how the mailets work.

Thank you in advance.

- Raju

Re: Custom Mailets in mailetcontainer.xml

Posted by Norman Maurer <no...@googlemail.com>.
yes it is...

I will have a look in a few..

bye
norman


Am Mittwoch, 29. Juni 2011 schrieb Raju Buchi <ra...@contentpilot.net>:
> Ok. I have created a bugreport (
> https://issues.apache.org/jira/browse/JAMES-1285). Hope thats the right
> place for reporting.
>
> Thank you.
>
> - Raju
>
>
> On Wed, Jun 29, 2011 at 11:01 AM, Norman Maurer <
> norman.maurer@googlemail.com> wrote:
>
>> Can you open a bugreport. Looks like a bug to me then....
>>
>> Bye
>> Norman
>>
>>
>> 2011/6/29, Raju Buchi <ra...@contentpilot.net>:
>> > Hello
>> >
>> > Thanks everyone, I have added the jar with the class in the conf/lib
>> folder.
>> > This was the jar file which was used with James 2.3.2 version.
>> >
>> > mailetcontainer.xml contains
>> >
>> > -----------
>> > <mailetcontainer>
>> >
>> >     <threads> 25 </threads>
>> >
>> >     <mailetpackages>
>> >       <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>> >
>> <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
>> >       <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
>> >
>> <mailetpackage>com.abc.util.james.maillet.VECallBack</mailetpackage>
>> >
>> >     </mailetpackages>
>> >
>> >     <matcherpackages>
>> >
>> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>> >
>> > <matcherpackage>org.apache.james.mailet.crypto.matchers</matcherpackage>
>> >
>> >
>> <matcherpackage>org.apache.james.mailetcontainer.lib.matchers</matcherpackage>
>> >
>> >
>> <matcherpackage>com.abc.util.james.matcher.NewsletterBounceMatcher</matcherpackage>
>> >     </matcherpackages>
>> >
>> >     <processor name="root">
>> >        <mailet match="All" class="PostmasterAlias"/>
>> >        <mailet match="RelayLimit=30" class="Null"/>
>> >        <mailet match="NewsletterBounceMatcher=webopnp"
>> class="VECallBack">
>> > <callbackurl>http://webop.abc.net/~web/cpnewsletter/trackEmailBounce.v
>> > </callbackurl>
>> > </mailet>
>> >        <mailet match="SMTPAuthSuccessful" class="ToProcessor">
>> >           <processor>transport</processor>
>> >        </mailet>
>> > -----------------
>> >
>> >
>> > I still get the same error where it says:
>> >
>> > INFO  11:45:39,886 | james.remotemanager | RemoteManager Service
>> connection
>> > backlog is: 10
>> > INFO  11:45:40,020 | james.mailetcontainer | Matcher All instantiated.
>> > INFO  11:45:40,024 | james.mailetcontainer | Mailet PostmasterAlias
>> > instantiated.
>> > INFO  11:45:40,032 | james.mailetcontainer | Matcher RelayLimit=30
>> > instantiated.
>> > INFO  11:45:40,034 | james.mailetcontainer | Mailet Null instantiated.
>> > ERROR 11:45:40,037 | james.mailetcontainer | Unable to init matcher
>> > NewsletterBounceMatcher=webopnp: org.apache.mailet.MailetException: Could
>> > not load matcher (NewsletterBounceMatcher);
>> >   nested exception is:
>> > java.lang.ClassNotFoundException: Requested matcher not found:
>> > NewsletterBounceMatcher.  Package searched:
>> >  org.apache.james.transport.matchers.
>> > org.apache.james.mailet.crypto.matchers.
>> > org.apache.james.mailetcontainer.lib.matchers.
>> > com.abc.util.james.matcher.NewsletterBounceMatcher.
>> > org.apache.mailet.MailetException: Could not load matcher
>> > (NewsletterBounceMatcher);
>> >   nested exception is:
>> > java.lang.ClassNotFoundException: Requested matcher not found:
>> > NewsletterBounceMatcher.  Package searched:
>> >  org.apache.james.transport.matchers.
>> > o

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Custom Mailets in mailetcontainer.xml

Posted by Raju Buchi <ra...@contentpilot.net>.
Ok. I have created a bugreport (
https://issues.apache.org/jira/browse/JAMES-1285). Hope thats the right
place for reporting.

Thank you.

- Raju


On Wed, Jun 29, 2011 at 11:01 AM, Norman Maurer <
norman.maurer@googlemail.com> wrote:

> Can you open a bugreport. Looks like a bug to me then....
>
> Bye
> Norman
>
>
> 2011/6/29, Raju Buchi <ra...@contentpilot.net>:
> > Hello
> >
> > Thanks everyone, I have added the jar with the class in the conf/lib
> folder.
> > This was the jar file which was used with James 2.3.2 version.
> >
> > mailetcontainer.xml contains
> >
> > -----------
> > <mailetcontainer>
> >
> >     <threads> 25 </threads>
> >
> >     <mailetpackages>
> >       <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
> >
> <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
> >       <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
> >
> <mailetpackage>com.abc.util.james.maillet.VECallBack</mailetpackage>
> >
> >     </mailetpackages>
> >
> >     <matcherpackages>
> >
> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
> >
> > <matcherpackage>org.apache.james.mailet.crypto.matchers</matcherpackage>
> >
> >
> <matcherpackage>org.apache.james.mailetcontainer.lib.matchers</matcherpackage>
> >
> >
> <matcherpackage>com.abc.util.james.matcher.NewsletterBounceMatcher</matcherpackage>
> >     </matcherpackages>
> >
> >     <processor name="root">
> >        <mailet match="All" class="PostmasterAlias"/>
> >        <mailet match="RelayLimit=30" class="Null"/>
> >        <mailet match="NewsletterBounceMatcher=webopnp"
> class="VECallBack">
> > <callbackurl>http://webop.abc.net/~web/cpnewsletter/trackEmailBounce.v
> > </callbackurl>
> > </mailet>
> >        <mailet match="SMTPAuthSuccessful" class="ToProcessor">
> >           <processor>transport</processor>
> >        </mailet>
> > -----------------
> >
> >
> > I still get the same error where it says:
> >
> > INFO  11:45:39,886 | james.remotemanager | RemoteManager Service
> connection
> > backlog is: 10
> > INFO  11:45:40,020 | james.mailetcontainer | Matcher All instantiated.
> > INFO  11:45:40,024 | james.mailetcontainer | Mailet PostmasterAlias
> > instantiated.
> > INFO  11:45:40,032 | james.mailetcontainer | Matcher RelayLimit=30
> > instantiated.
> > INFO  11:45:40,034 | james.mailetcontainer | Mailet Null instantiated.
> > ERROR 11:45:40,037 | james.mailetcontainer | Unable to init matcher
> > NewsletterBounceMatcher=webopnp: org.apache.mailet.MailetException: Could
> > not load matcher (NewsletterBounceMatcher);
> >   nested exception is:
> > java.lang.ClassNotFoundException: Requested matcher not found:
> > NewsletterBounceMatcher.  Package searched:
> >  org.apache.james.transport.matchers.
> > org.apache.james.mailet.crypto.matchers.
> > org.apache.james.mailetcontainer.lib.matchers.
> > com.abc.util.james.matcher.NewsletterBounceMatcher.
> > org.apache.mailet.MailetException: Could not load matcher
> > (NewsletterBounceMatcher);
> >   nested exception is:
> > java.lang.ClassNotFoundException: Requested matcher not found:
> > NewsletterBounceMatcher.  Package searched:
> >  org.apache.james.transport.matchers.
> > org.apache.james.mailet.crypto.matchers.
> > org.apache.james.mailetcontainer.lib.matchers.
> > com.abc.util.james.matcher.NewsletterBounceMatcher.
> > at
> >
> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
> > at
> >
> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
> > at
> >
> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
> > at
> >
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
> >
> >
> > ------------------------------------------------
> >
> >
> > Do I have to modify the jar file included in any way? I am not sure if it
> is
> > compatible with James 3.0-M2.
> >
> > Any suggestions?
> >
> > - Raju
> >
> >
> >
> >
> > 2011/6/29 Norman Maurer <no...@apache.org>
> >
> >> Hi,
> >>
> >> just to give some more background. We did this to avoid "ClassName"
> >> clashes. So if there two classes with the same name but resist in
> >> different packages its still possible to use them..
> >>
> >>
> >> Bye,
> >> Norman
> >>
> >> Am 29.06.2011 06:34, schrieb Eric Charles:
> >> > Hi,
> >> >
> >> > Try to define your matcher with the full qualified name in the class
> >> > attribute (class="com.abc.util.james.matcher.VECallBAck").
> >> > You also need to add the jar with that class in the conf/lib folder.
> >> >
> >> > Thx.
> >> >
> >> > On 29/06/11 01:20, Raju Buchi wrote:
> >> >> Hello
> >> >>
> >> >> I have been using James 2.3.3 before and had a mailet configuration
> >> >> in the
> >> >> config.xml
> >> >>
> >> >> <!-- Set the Java packages from which to load mailets and matchers
> -->
> >> >> <mailetpackages>
> >> >> <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
> >> >>
> >> >>
> <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
> >> >> *<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
> >> >> </mailetpackages>
> >> >> <matcherpackages>
> >> >> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
> >> >>
> >> >>
> >>
> <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
> >> >>
> >> >> *<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
> >> >> </matcherpackages>
> >> >>
> >> >>
> >> >> Inside<processor name="root">, I had
> >> >>
> >> >> <mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
> >> >> <callbackurl>*http://url*</callbackurl>
> >> >> </mailet>
> >> >>
> >> >> This was used for tracking bounces where our application would track
> >> >> for
> >> >> Soft/Hard bounces and create log. It worked fine in 2.3.2. I have
> >> >> recently
> >> >> upgraded the server to 3.0.2. When I used the same
> >> >>
> >> >> configuration above in the mailetcontainer.xml
> >> >>
> >> >> I am getting an error when starting up James which say...
> >> >>
> >> >> ----------------------------------------
> >> >> INFO 13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
> >> >> INFO 13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
> >> >> instantiated.
> >> >> INFO 13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
> >> >> instantiated.
> >> >> INFO 13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
> >> >> ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
> >> >> NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException:
> >> >> Could not
> >> >> load matcher (NewsletterBounceMatcher);
> >> >> nested exception is:
> >> >> java.lang.ClassNotFoundException: Requested matcher not found:
> >> >> NewsletterBounceMatcher. Package searched:
> >> >> org.apache.james.transport.matchers.
> >> >> org.apache.james.mailet.crypto.matchers.
> >> >> org.apache.james.mailetcontainer.lib.matchers.
> >> >> com.abc.util.james.matcher.
> >> >> org.apache.mailet.MailetException: Could not load matcher
> >> >> (NewsletterBounceMatcher);
> >> >> nested exception is:
> >> >> java.lang.ClassNotFoundException: Requested matcher not found:
> >> >> NewsletterBounceMatcher. Package searched:
> >> >> org.apache.james.transport.matchers.
> >> >> org.apache.james.mailet.crypto.matchers.
> >> >> org.apache.james.mailetcontainer.lib.matchers.
> >> >> com.abc.util.james.matcher.
> >> >> at
> >> >>
> >>
> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
> >> >>
> >> >> at
> >> >>
> >>
> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
> >> >>
> >> >> at
> >> >>
> >>
> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
> >> >>
> >> >> at
> >> >>
> >>
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
> >> >>
> >> >> at
> >> >>
> >>
> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
> >> >>
> >> >> at
> >> >>
> >>
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
> >> >>
> >> >> -------------------------------------------------------
> >> >>
> >> >> I am sure that there is something something... Do I need to include
> any
> >> >> library files? Do I have change the custom mailets to be compatible
> >> >> with the
> >> >> new version of James?
> >> >>
> >> >> Can anyone help me figuring this out. I have no idea how the mailets
> >> >> work.
> >> >>
> >> >> Thank you in advance.
> >> >>
> >> >> - Raju
> >> >>
> >> >
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Custom Mailets in mailetcontainer.xml

Posted by Norman Maurer <no...@googlemail.com>.
Can you open a bugreport. Looks like a bug to me then....

Bye
Norman


2011/6/29, Raju Buchi <ra...@contentpilot.net>:
> Hello
>
> Thanks everyone, I have added the jar with the class in the conf/lib folder.
> This was the jar file which was used with James 2.3.2 version.
>
> mailetcontainer.xml contains
>
> -----------
> <mailetcontainer>
>
>     <threads> 25 </threads>
>
>     <mailetpackages>
>       <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>       <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
>       <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
>       <mailetpackage>com.abc.util.james.maillet.VECallBack</mailetpackage>
>
>     </mailetpackages>
>
>     <matcherpackages>
>       <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>
> <matcherpackage>org.apache.james.mailet.crypto.matchers</matcherpackage>
>
> <matcherpackage>org.apache.james.mailetcontainer.lib.matchers</matcherpackage>
>
> <matcherpackage>com.abc.util.james.matcher.NewsletterBounceMatcher</matcherpackage>
>     </matcherpackages>
>
>     <processor name="root">
>        <mailet match="All" class="PostmasterAlias"/>
>        <mailet match="RelayLimit=30" class="Null"/>
>        <mailet match="NewsletterBounceMatcher=webopnp" class="VECallBack">
> <callbackurl>http://webop.abc.net/~web/cpnewsletter/trackEmailBounce.v
> </callbackurl>
> </mailet>
>        <mailet match="SMTPAuthSuccessful" class="ToProcessor">
>           <processor>transport</processor>
>        </mailet>
> -----------------
>
>
> I still get the same error where it says:
>
> INFO  11:45:39,886 | james.remotemanager | RemoteManager Service connection
> backlog is: 10
> INFO  11:45:40,020 | james.mailetcontainer | Matcher All instantiated.
> INFO  11:45:40,024 | james.mailetcontainer | Mailet PostmasterAlias
> instantiated.
> INFO  11:45:40,032 | james.mailetcontainer | Matcher RelayLimit=30
> instantiated.
> INFO  11:45:40,034 | james.mailetcontainer | Mailet Null instantiated.
> ERROR 11:45:40,037 | james.mailetcontainer | Unable to init matcher
> NewsletterBounceMatcher=webopnp: org.apache.mailet.MailetException: Could
> not load matcher (NewsletterBounceMatcher);
>   nested exception is:
> java.lang.ClassNotFoundException: Requested matcher not found:
> NewsletterBounceMatcher.  Package searched:
>  org.apache.james.transport.matchers.
> org.apache.james.mailet.crypto.matchers.
> org.apache.james.mailetcontainer.lib.matchers.
> com.abc.util.james.matcher.NewsletterBounceMatcher.
> org.apache.mailet.MailetException: Could not load matcher
> (NewsletterBounceMatcher);
>   nested exception is:
> java.lang.ClassNotFoundException: Requested matcher not found:
> NewsletterBounceMatcher.  Package searched:
>  org.apache.james.transport.matchers.
> org.apache.james.mailet.crypto.matchers.
> org.apache.james.mailetcontainer.lib.matchers.
> com.abc.util.james.matcher.NewsletterBounceMatcher.
> at
> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
> at
> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
> at
> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
> at
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
>
>
> ------------------------------------------------
>
>
> Do I have to modify the jar file included in any way? I am not sure if it is
> compatible with James 3.0-M2.
>
> Any suggestions?
>
> - Raju
>
>
>
>
> 2011/6/29 Norman Maurer <no...@apache.org>
>
>> Hi,
>>
>> just to give some more background. We did this to avoid "ClassName"
>> clashes. So if there two classes with the same name but resist in
>> different packages its still possible to use them..
>>
>>
>> Bye,
>> Norman
>>
>> Am 29.06.2011 06:34, schrieb Eric Charles:
>> > Hi,
>> >
>> > Try to define your matcher with the full qualified name in the class
>> > attribute (class="com.abc.util.james.matcher.VECallBAck").
>> > You also need to add the jar with that class in the conf/lib folder.
>> >
>> > Thx.
>> >
>> > On 29/06/11 01:20, Raju Buchi wrote:
>> >> Hello
>> >>
>> >> I have been using James 2.3.3 before and had a mailet configuration
>> >> in the
>> >> config.xml
>> >>
>> >> <!-- Set the Java packages from which to load mailets and matchers -->
>> >> <mailetpackages>
>> >> <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>> >>
>> >> <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
>> >> *<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
>> >> </mailetpackages>
>> >> <matcherpackages>
>> >> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>> >>
>> >>
>> <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
>> >>
>> >> *<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
>> >> </matcherpackages>
>> >>
>> >>
>> >> Inside<processor name="root">, I had
>> >>
>> >> <mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
>> >> <callbackurl>*http://url*</callbackurl>
>> >> </mailet>
>> >>
>> >> This was used for tracking bounces where our application would track
>> >> for
>> >> Soft/Hard bounces and create log. It worked fine in 2.3.2. I have
>> >> recently
>> >> upgraded the server to 3.0.2. When I used the same
>> >>
>> >> configuration above in the mailetcontainer.xml
>> >>
>> >> I am getting an error when starting up James which say...
>> >>
>> >> ----------------------------------------
>> >> INFO 13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
>> >> INFO 13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
>> >> instantiated.
>> >> INFO 13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
>> >> instantiated.
>> >> INFO 13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
>> >> ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
>> >> NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException:
>> >> Could not
>> >> load matcher (NewsletterBounceMatcher);
>> >> nested exception is:
>> >> java.lang.ClassNotFoundException: Requested matcher not found:
>> >> NewsletterBounceMatcher. Package searched:
>> >> org.apache.james.transport.matchers.
>> >> org.apache.james.mailet.crypto.matchers.
>> >> org.apache.james.mailetcontainer.lib.matchers.
>> >> com.abc.util.james.matcher.
>> >> org.apache.mailet.MailetException: Could not load matcher
>> >> (NewsletterBounceMatcher);
>> >> nested exception is:
>> >> java.lang.ClassNotFoundException: Requested matcher not found:
>> >> NewsletterBounceMatcher. Package searched:
>> >> org.apache.james.transport.matchers.
>> >> org.apache.james.mailet.crypto.matchers.
>> >> org.apache.james.mailetcontainer.lib.matchers.
>> >> com.abc.util.james.matcher.
>> >> at
>> >>
>> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
>> >>
>> >> at
>> >>
>> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
>> >>
>> >> at
>> >>
>> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
>> >>
>> >> at
>> >>
>> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
>> >>
>> >> at
>> >>
>> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
>> >>
>> >> at
>> >>
>> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
>> >>
>> >> -------------------------------------------------------
>> >>
>> >> I am sure that there is something something... Do I need to include any
>> >> library files? Do I have change the custom mailets to be compatible
>> >> with the
>> >> new version of James?
>> >>
>> >> Can anyone help me figuring this out. I have no idea how the mailets
>> >> work.
>> >>
>> >> Thank you in advance.
>> >>
>> >> - Raju
>> >>
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Custom Mailets in mailetcontainer.xml

Posted by Raju Buchi <ra...@contentpilot.net>.
Hello

Thanks everyone, I have added the jar with the class in the conf/lib folder.
This was the jar file which was used with James 2.3.2 version.

mailetcontainer.xml contains

-----------
<mailetcontainer>

    <threads> 25 </threads>

    <mailetpackages>
      <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
      <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
      <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
      <mailetpackage>com.abc.util.james.maillet.VECallBack</mailetpackage>

    </mailetpackages>

    <matcherpackages>
      <matcherpackage>org.apache.james.transport.matchers</matcherpackage>

<matcherpackage>org.apache.james.mailet.crypto.matchers</matcherpackage>

<matcherpackage>org.apache.james.mailetcontainer.lib.matchers</matcherpackage>

<matcherpackage>com.abc.util.james.matcher.NewsletterBounceMatcher</matcherpackage>
    </matcherpackages>

    <processor name="root">
       <mailet match="All" class="PostmasterAlias"/>
       <mailet match="RelayLimit=30" class="Null"/>
       <mailet match="NewsletterBounceMatcher=webopnp" class="VECallBack">
<callbackurl>http://webop.abc.net/~web/cpnewsletter/trackEmailBounce.v
</callbackurl>
</mailet>
       <mailet match="SMTPAuthSuccessful" class="ToProcessor">
          <processor>transport</processor>
       </mailet>
-----------------


I still get the same error where it says:

INFO  11:45:39,886 | james.remotemanager | RemoteManager Service connection
backlog is: 10
INFO  11:45:40,020 | james.mailetcontainer | Matcher All instantiated.
INFO  11:45:40,024 | james.mailetcontainer | Mailet PostmasterAlias
instantiated.
INFO  11:45:40,032 | james.mailetcontainer | Matcher RelayLimit=30
instantiated.
INFO  11:45:40,034 | james.mailetcontainer | Mailet Null instantiated.
ERROR 11:45:40,037 | james.mailetcontainer | Unable to init matcher
NewsletterBounceMatcher=webopnp: org.apache.mailet.MailetException: Could
not load matcher (NewsletterBounceMatcher);
  nested exception is:
java.lang.ClassNotFoundException: Requested matcher not found:
NewsletterBounceMatcher.  Package searched:
 org.apache.james.transport.matchers.
org.apache.james.mailet.crypto.matchers.
org.apache.james.mailetcontainer.lib.matchers.
com.abc.util.james.matcher.NewsletterBounceMatcher.
org.apache.mailet.MailetException: Could not load matcher
(NewsletterBounceMatcher);
  nested exception is:
java.lang.ClassNotFoundException: Requested matcher not found:
NewsletterBounceMatcher.  Package searched:
 org.apache.james.transport.matchers.
org.apache.james.mailet.crypto.matchers.
org.apache.james.mailetcontainer.lib.matchers.
com.abc.util.james.matcher.NewsletterBounceMatcher.
at
org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
at
org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
at
org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
at
org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)


------------------------------------------------


Do I have to modify the jar file included in any way? I am not sure if it is
compatible with James 3.0-M2.

Any suggestions?

- Raju




2011/6/29 Norman Maurer <no...@apache.org>

> Hi,
>
> just to give some more background. We did this to avoid "ClassName"
> clashes. So if there two classes with the same name but resist in
> different packages its still possible to use them..
>
>
> Bye,
> Norman
>
> Am 29.06.2011 06:34, schrieb Eric Charles:
> > Hi,
> >
> > Try to define your matcher with the full qualified name in the class
> > attribute (class="com.abc.util.james.matcher.VECallBAck").
> > You also need to add the jar with that class in the conf/lib folder.
> >
> > Thx.
> >
> > On 29/06/11 01:20, Raju Buchi wrote:
> >> Hello
> >>
> >> I have been using James 2.3.3 before and had a mailet configuration
> >> in the
> >> config.xml
> >>
> >> <!-- Set the Java packages from which to load mailets and matchers -->
> >> <mailetpackages>
> >> <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
> >>
> >> <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
> >> *<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
> >> </mailetpackages>
> >> <matcherpackages>
> >> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
> >>
> >>
> <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
> >>
> >> *<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
> >> </matcherpackages>
> >>
> >>
> >> Inside<processor name="root">, I had
> >>
> >> <mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
> >> <callbackurl>*http://url*</callbackurl>
> >> </mailet>
> >>
> >> This was used for tracking bounces where our application would track for
> >> Soft/Hard bounces and create log. It worked fine in 2.3.2. I have
> >> recently
> >> upgraded the server to 3.0.2. When I used the same
> >>
> >> configuration above in the mailetcontainer.xml
> >>
> >> I am getting an error when starting up James which say...
> >>
> >> ----------------------------------------
> >> INFO 13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
> >> INFO 13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
> >> instantiated.
> >> INFO 13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
> >> instantiated.
> >> INFO 13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
> >> ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
> >> NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException:
> >> Could not
> >> load matcher (NewsletterBounceMatcher);
> >> nested exception is:
> >> java.lang.ClassNotFoundException: Requested matcher not found:
> >> NewsletterBounceMatcher. Package searched:
> >> org.apache.james.transport.matchers.
> >> org.apache.james.mailet.crypto.matchers.
> >> org.apache.james.mailetcontainer.lib.matchers.
> >> com.abc.util.james.matcher.
> >> org.apache.mailet.MailetException: Could not load matcher
> >> (NewsletterBounceMatcher);
> >> nested exception is:
> >> java.lang.ClassNotFoundException: Requested matcher not found:
> >> NewsletterBounceMatcher. Package searched:
> >> org.apache.james.transport.matchers.
> >> org.apache.james.mailet.crypto.matchers.
> >> org.apache.james.mailetcontainer.lib.matchers.
> >> com.abc.util.james.matcher.
> >> at
> >>
> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
> >>
> >> at
> >>
> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
> >>
> >> at
> >>
> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
> >>
> >> at
> >>
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
> >>
> >> at
> >>
> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
> >>
> >> at
> >>
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
> >>
> >> -------------------------------------------------------
> >>
> >> I am sure that there is something something... Do I need to include any
> >> library files? Do I have change the custom mailets to be compatible
> >> with the
> >> new version of James?
> >>
> >> Can anyone help me figuring this out. I have no idea how the mailets
> >> work.
> >>
> >> Thank you in advance.
> >>
> >> - Raju
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: Custom Mailets in mailetcontainer.xml

Posted by Norman Maurer <no...@apache.org>.
Hi,

just to give some more background. We did this to avoid "ClassName"
clashes. So if there two classes with the same name but resist in
different packages its still possible to use them..


Bye,
Norman

Am 29.06.2011 06:34, schrieb Eric Charles:
> Hi,
>
> Try to define your matcher with the full qualified name in the class
> attribute (class="com.abc.util.james.matcher.VECallBAck").
> You also need to add the jar with that class in the conf/lib folder.
>
> Thx.
>
> On 29/06/11 01:20, Raju Buchi wrote:
>> Hello
>>
>> I have been using James 2.3.3 before and had a mailet configuration
>> in the
>> config.xml
>>
>> <!-- Set the Java packages from which to load mailets and matchers -->
>> <mailetpackages>
>> <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>>
>> <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
>> *<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
>> </mailetpackages>
>> <matcherpackages>
>> <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>>
>> <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
>>
>> *<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
>> </matcherpackages>
>>
>>
>> Inside<processor name="root">, I had
>>
>> <mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
>> <callbackurl>*http://url*</callbackurl>
>> </mailet>
>>
>> This was used for tracking bounces where our application would track for
>> Soft/Hard bounces and create log. It worked fine in 2.3.2. I have
>> recently
>> upgraded the server to 3.0.2. When I used the same
>>
>> configuration above in the mailetcontainer.xml
>>
>> I am getting an error when starting up James which say...
>>
>> ----------------------------------------
>> INFO 13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
>> INFO 13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
>> instantiated.
>> INFO 13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
>> instantiated.
>> INFO 13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
>> ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
>> NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException:
>> Could not
>> load matcher (NewsletterBounceMatcher);
>> nested exception is:
>> java.lang.ClassNotFoundException: Requested matcher not found:
>> NewsletterBounceMatcher. Package searched:
>> org.apache.james.transport.matchers.
>> org.apache.james.mailet.crypto.matchers.
>> org.apache.james.mailetcontainer.lib.matchers.
>> com.abc.util.james.matcher.
>> org.apache.mailet.MailetException: Could not load matcher
>> (NewsletterBounceMatcher);
>> nested exception is:
>> java.lang.ClassNotFoundException: Requested matcher not found:
>> NewsletterBounceMatcher. Package searched:
>> org.apache.james.transport.matchers.
>> org.apache.james.mailet.crypto.matchers.
>> org.apache.james.mailetcontainer.lib.matchers.
>> com.abc.util.james.matcher.
>> at
>> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
>>
>> at
>> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
>>
>> at
>> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
>>
>> at
>> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
>>
>> at
>> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
>>
>> at
>> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
>>
>> -------------------------------------------------------
>>
>> I am sure that there is something something... Do I need to include any
>> library files? Do I have change the custom mailets to be compatible
>> with the
>> new version of James?
>>
>> Can anyone help me figuring this out. I have no idea how the mailets
>> work.
>>
>> Thank you in advance.
>>
>> - Raju
>>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Custom Mailets in mailetcontainer.xml

Posted by Eric Charles <er...@apache.org>.
Hi,

Try to define your matcher with the full qualified name in the class 
attribute (class="com.abc.util.james.matcher.VECallBAck").
You also need to add the jar with that class in the conf/lib folder.

Thx.

On 29/06/11 01:20, Raju Buchi wrote:
> Hello
>
> I have been using James 2.3.3 before and had a mailet configuration in the
> config.xml
>
> <!-- Set the Java packages from which to load mailets and matchers -->
>     <mailetpackages>
>        <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>
> <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
> *<mailetpackage>com.abc.util.james.maillet</mailetpackage>*
>     </mailetpackages>
>     <matcherpackages>
>        <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
>
> <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
> *<matcherpackage>com.abc.util.james.matcher</matcherpackage>*
>     </matcherpackages>
>
>
> Inside<processor name="root">, I had
>
> <mailet match="NewsletterBounceMatcher=stgnp" class="VECallBack">
> <callbackurl>*http://url*</callbackurl>
> </mailet>
>
> This was used for tracking bounces where our application would track for
> Soft/Hard bounces and create log. It worked fine in 2.3.2. I have recently
> upgraded the server to 3.0.2. When I used the same
>
> configuration above in the mailetcontainer.xml
>
> I am getting an error when starting up James which say...
>
> ----------------------------------------
> INFO  13:22:14,494 | james.mailetcontainer | Matcher All instantiated.
> INFO  13:22:14,498 | james.mailetcontainer | Mailet PostmasterAlias
> instantiated.
> INFO  13:22:14,566 | james.mailetcontainer | Matcher RelayLimit=30
> instantiated.
> INFO  13:22:14,569 | james.mailetcontainer | Mailet Null instantiated.
> ERROR 13:22:14,573 | james.mailetcontainer | Unable to init matcher
> NewsletterBounceMatcher=stgnp: org.apache.mailet.MailetException: Could not
> load matcher (NewsletterBounceMatcher);
>    nested exception is:
> java.lang.ClassNotFoundException: Requested matcher not found:
> NewsletterBounceMatcher.  Package searched:
>   org.apache.james.transport.matchers.
> org.apache.james.mailet.crypto.matchers.
> org.apache.james.mailetcontainer.lib.matchers. com.abc.util.james.matcher.
> org.apache.mailet.MailetException: Could not load matcher
> (NewsletterBounceMatcher);
>    nested exception is:
> java.lang.ClassNotFoundException: Requested matcher not found:
> NewsletterBounceMatcher.  Package searched:
>   org.apache.james.transport.matchers.
> org.apache.james.mailet.crypto.matchers.
> org.apache.james.mailetcontainer.lib.matchers. com.abc.util.james.matcher.
> at
> org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
> at
> org.apache.james.mailetcontainer.lib.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:78)
> at
> org.apache.james.mailetcontainer.camel.CamelMailProcessorList$SpoolRouteBuilder.configure(CamelMailProcessorList.java:386)
> at
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:295)
> at
> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:250)
> at
> org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:236)
> -------------------------------------------------------
>
> I am sure that there  is something something... Do I need to include any
> library files? Do I have change the custom mailets to be compatible with the
> new version of James?
>
> Can anyone help me figuring this out. I have no idea how the mailets work.
>
> Thank you in advance.
>
> - Raju
>

-- 
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org