[ 
https://issues.apache.org/jira/browse/JAMES-2141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16159761#comment-16159761
 ] 

Tellier Benoit commented on JAMES-2141:
---------------------------------------

Hi,

The error you encountered is due to mailet instanciation.

Having a look at your configuration, you have a lot of custom mailets 
(com.cisco.mail.mailets.*).

These custom mailets seems to be using some James Server internal concepts like 
SpoolRepository. These APIs changed since 3.0 release (as they are not part of 
the Mailet API). Hence James can not instantiate these mailets (as it don't 
know the class anymore).

What I would advise is:

 - Write mailets that only depends on* APIs* (mailet-api data-api, mailbox-api, 
etc...), and if you intend you mailets to be running on a James 3.0 server, 
check that you can compile them with James 3.0 dependencies.
 - If possible to share your code, we can imagine giving you hints for 
reimplementation here.
 - Also please note that using third party mailets exposes you to this kind of 
breaking changes. As they look pretty generic, they might be useful to other 
users, and you will gain safety: your mailets unit tests will be run every time 
there is a code change, bringing you safety.
 - If not possible, I would advocate having a CI environment testing your 
mailets on a running James server (integration tests). What we have been doing 
in /server/mailet/integration-testing might interest you.
 - Guice packaging allows better error handling, and will actually specify the 
name of the mailet generating the error.

Here the custom mailets being used (for notice) :

 - com.cisco.mail.mailets.ErrorHandlerMailet
 - com.cisco.mail.mailets.AdminOrAttachCheckMailet
 - com.cisco.mail.mailets.ConfigLoaderMailet
 - com.cisco.mail.mailets.LegacyRouterMailet
 - com.cisco.mail.mailets.Retry
 - com.cisco.mail.mailets.AdministrationMailet
 - com.cisco.mail.mailets.NotificationMailet
 - com.cisco.mail.mailets.ValidatorMailet
 - com.cisco.mail.mailets.ParserMailet
 - com.cisco.mail.mailets.ExtractAttachmentMailet
 - com.cisco.mail.mailets.OutboundRouterMailet

> Getting an error: Error creating bean with name 'mailprocessor': Invocation 
> of init method failed; nested exception is java.lang.NoClassDefFoundError: 
> org/apache/james/services/SpoolRepository$AcceptFilter
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JAMES-2141
>                 URL: https://issues.apache.org/jira/browse/JAMES-2141
>             Project: James Server
>          Issue Type: Bug
>          Components: Mailet Contributions
>    Affects Versions: 3.0.0
>         Environment: Unix Host
>            Reporter: Arpit Srivastava
>             Fix For: 3.0.0
>
>         Attachments: ErrorLog8.txt, mailetcontainer.xml
>
>
> Hi 
> I am facing this error: Error creating bean with name 'mailprocessor': 
> Invocation of init method failed; nested exception is 
> java.lang.NoClassDefFoundError: 
> org/apache/james/services/SpoolRepository$AcceptFilter
> .
> Error log is attached.
> Please suggest on what is the issue.
> Thanks
> Arpit



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to