james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Rouvet <laur...@roovay.com>
Subject Portage mailet to james-3.0-dev .... & Avalon XXX
Date Fri, 20 May 2005 10:44:19 GMT
Hi,

I'm trying to move my mailet to james-3.0-dev (mainly because I've a 
connection pool bug to fix and that I'm currently using james 2.2.1RC1 
but I don't have the source for that version).

First of all, I would to said that each time (it's the second time) that 
I'm moving my code to a new James version, I spend several hours in 
order to be able to compile and deploy.
I think that it's not a James issue but that problem come from phoenix 
and avalon which are complicated, not soo stable, and not well finished.
However I think that framework is technicaly quite nice, I had probably 
choiced it too.

So, regarding previus discussions, I'd encourage to choice a more stable 
and well know framework. I'd like a J2EE framework like Jboss or 
Geronimo (if that one be come enought usable).


Back to my problem:

I'm use james-3.0-dev 170743   which compile and work ok  :-D
but I've several problems with my own mailet:

- I've notice that cornerstone.jar is not used anymore but replaced by a 
list of small jar: cornerstone-XXXX-api/impl-1.0.jar

  -> is it right ?
     because my mailet don't compile because the package
org.apache.avalon.service.datasource(s) use NOW a (s)


That small problem fixed, I'm able to compile it, but I got the 
following error at start:


20/05/05 11:44:08 ERROR spoolmanager: Unable to init mailet 
EmailSupportStore: javax.mail.MessagingException: Error initializing 
EmailSupportStore;
   nested exception is:
	java.lang.ClassCastException
javax.mail.MessagingException: Error initializing EmailSupportStore;
   nested exception is:
	java.lang.ClassCastException
	at email.james.mailets.EmailSupportStore.init(EmailSupportStore.java:56)
	at org.apache.mailet.GenericMailet.init(GenericMailet.java:129)
	at org.apache.james.transport.MailetLoader.getMailet(MailetLoader.java:60)
	at 
org.apache.james.transport.JamesSpoolManager.initialize(JamesSpoolManager.java:250)
	at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
	at 
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:144)
	at 
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:480)
...


My code (full code attached):

  try {
    ComponentManager componentManager =
	  (ComponentManager)getMailetContext().getAttribute(
				Constants.AVALON_COMPONENT_MANAGER);
    DataSourceSelector datasources =
	(DataSourceSelector)componentManager.lookup(
					DataSourceSelector.ROLE);
    datasource = new DataSourceWrapper(
	(DataSourceComponent)datasources.select(datasourceName));
    if (crmDatasourceName != null)
	crmDatasource = new DataSourceWrapper(
	  (DataSourceComponent)datasources.select(crmDatasourceName));
  }
  catch (Exception e) {
     // line 56
     throw new
	MessagingException("Error initializing EmailSupportStore", e);
  }



Does there is some compatibility issue between james 2.2 and james 3?
Does I'm using the right version? or does I mixing wrong APIs?
Any idea of my ClassCastException error?

Thanks

Laurent Rouvet



Mime
View raw message