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 Himanshu Singh <SI...@stgeorge.com.au> on 2007/10/10 07:20:37 UTC

Upgrade to james-2.3.1 - NoClassDefFoundError for GenericMatcher

Hi,
 
We have been running a customized mailet under james-2.2.1-RC1 to
process emails to a specific mailbox, and are now trying to set up the
same under 2.3.1.
 
After installing the server and running it as a service, I have made
required changes in james-fetchmail.xml and following changes in
config.xml:
 
   <mailetpackages>
     
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
     
<mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
 <mailetpackage>au.com.stgeorge.hrx.mailets</mailetpackage>
 <mailetpackage>au.com.stgeorge.test.mailets</mailetpackage>
   </mailetpackages>
   <matcherpackages>
     
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
     
<matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
 <matcherpackage>au.com.stgeorge.hrx.mailets</matcherpackage>
 <matcherpackage>au.com.stgeorge.test.mailets</matcherpackage>
   </matcherpackages>
   <spoolmanager>
      <!-- Number of spool threads -->
      <threads> 10 </threads>
 
      <!-- The root processor is a required processor - James routes
all mail on the spool -->
      <!-- through this processor first. -->
      <!-- -->
      <!-- This configuration is a sample configuration for the root
processor. -->
      <processor name="root">
 
  <mailet match="MatchSingleRecipient=hrxleaveapprove@localhost"
class="LeaveApprovalMailet">
   <subject>Leave is Approved</subject>
   <content>Your manager has approved your leave.</content>
  </mailet>

On starting the service, I am getting following error in the wrapper
log:
 
   
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
Component named "spoolmanager" failed to pass through the Starting
stage. (Reason: java.lang.NoClassDefFoundError:            
org/apache/mailet/GenericMatcher).
 
The service starts up fine if I remove the <mailet match=... node from
config.xml
 
The running version (2.2.1-RC1) did not require us to repackage
james.sar to include the custom created HrxMail.jar (that has
LeaveApprovalMailet.class), or mailet_1_0.jar. After a bit of reading
through the archives, I have tried repackaging james.sar to include the
2 extra jars. I can see them in the work directory after starting the
service, but the error is still there.
 
Could you please guide me as to what could I be missing. I am attaching
wrapper.log for the complete trace of the error.
 
Thanking you in anticipation of your help.
 
Regards,
Himanshu
 
 

**********************************************************************
*****   IMPORTANT INFORMATION    *****
This document should be read only by those persons to whom it is 
addressed and its content is not intended for use by any other 
persons.  If you have received this message in error, please notify 
us immediately.  Please also destroy and delete the message from 
your computer.  Any unauthorised form of reproduction of this message 
is strictly prohibited.

St George Bank Limited AFSL 240997, Advance Asset Management Limited 
AFSL 240902,  St George Life Limited AFSL 240900, ASGARD Capital Management Limited 
AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for 
the proper and complete transmission of the information contained in 
this communication, nor for any delay in its receipt.
**********************************************************************


Re: Upgrade to james-2.3.1 - NoClassDefFoundError for GenericMatcher

Posted by Stefano Bagnara <ap...@bago.org>.
Himanshu Singh ha scritto:
> Hi,
>  
> We have been running a customized mailet under james-2.2.1-RC1 to
> process emails to a specific mailbox, and are now trying to set up the
> same under 2.3.1.
>  
> After installing the server and running it as a service, I have made
> required changes in james-fetchmail.xml and following changes in config.xml:
> [...]
> On starting the service, I am getting following error in the wrapper log:
>  
>     org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
> Component named "spoolmanager" failed to pass through the Starting
> stage. (Reason: java.lang.NoClassDefFoundError:            
> org/apache/mailet/GenericMatcher).

Have you recompiled your mailets?

> The service starts up fine if I remove the <mailet match=... node from
> config.xml
>  
> The running version (2.2.1-RC1) did not require us to repackage
> james.sar to include the custom created HrxMail.jar (that has
> LeaveApprovalMailet.class), or mailet_1_0.jar. After a bit of reading
> through the archives, I have tried repackaging james.sar to include the
> 2 extra jars. I can see them in the work directory after starting the
> service, but the error is still there.

You can place your jar in the apps/james/SAR-INF/lib folder, but you
don't have to build your mailets against mailet_1_0.jar, but instead use
the mailet.jar you find in the james 2.3.1 sar.

Stefano


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