Hi Eric, I was more thinkin about override the getClassLoader() method:
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/core/io/ResourceLoader.html Bye, Norman 2010/5/11 Eric Charles <[email protected]>: > Hi Norman, > About the classloader, are you thinking to set it via > java.system.class.loader ? > Tks, > Eric > > On 05/10/2010 06:43 PM, Norman Maurer wrote: >> >> Hi Eric, >> >> that would be cool . With shell this is no problem. But my windows cmd >> knowledge stopped me from doing this for windows. Maybe we could try >> to use a custom classloader which will just pick up every jar inthe >> folder. >> >> WDYT? >> >> Bye >> Norman >> >> 2010/5/10, Eric Charles<[email protected]>: >> >>> >>> Hi Ranjib, >>> >>> The run.sh script located in bin directory set explicitly the classpath >>> (no automatic discovery). >>> Can you try to add you own jar to the list and see if it works. >>> >>> A nice feature would be james putting all jars in lib on the classpath >>> (with jdk 1.6, simply set the directory on the classpath, otherwise a >>> some bash commands must be used). >>> >>> Tks, >>> >>> Eric >>> >>> >>> On 05/10/2010 06:28 PM, Ranjib Dey wrote: >>> >>>> >>>> Hi All, >>>> I am trying to migrate our james based apps form james 2.3.2 to james 3( >>>> which uses spring). Currently i am facing some trouble to incorporate >>>> our >>>> custom mailets on james3. I have placed the necessary jar files inside >>>> lib >>>> subdirectory, but james is not able to pick up the classes.. although >>>> its >>>> showing it has searched the packages.. >>>> following is the log >>>> ________________________________ >>>> *Exception in thread "main" >>>> org.springframework.beans.factory.BeanCreationException: Error creating >>>> bean >>>> with name 'instanceFactory' defined in class path resource >>>> [spring-beans.xml]: Initialization of bean failed; nested exception is >>>> org.springframework.beans.factory.BeanCreationException: Error creating >>>> bean >>>> with name 'jamesCamelContext': Invocation of init method failed; nested >>>> exception is org.apache.commons.configuration.ConfigurationException: >>>> Unable >>>> to init matcher >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) >>>> at >>>> >>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) >>>> at >>>> >>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557) >>>> at >>>> >>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842) >>>> at >>>> >>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416) >>>> at >>>> >>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) >>>> at >>>> >>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) >>>> at >>>> >>>> org.apache.james.container.spring.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:72) >>>> at org.apache.james.container.spring.Main.main(Main.java:27) >>>> Caused by: org.springframework.beans.factory.BeanCreationException: >>>> Error >>>> creating bean with name 'jamesCamelContext': Invocation of init method >>>> failed; nested exception is >>>> org.apache.commons.configuration.ConfigurationException: Unable to init >>>> matcher >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) >>>> at >>>> >>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) >>>> at >>>> >>>> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1004) >>>> at >>>> >>>> org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:88) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1394) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512) >>>> ... 12 more >>>> Caused by: org.apache.commons.configuration.ConfigurationException: >>>> Unable >>>> to init matcher >>>> at >>>> >>>> org.apache.james.transport.camel.AbstractProcessorRouteBuilder.configure(AbstractProcessorRouteBuilder.java:159) >>>> 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) >>>> at >>>> >>>> org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:549) >>>> at >>>> >>>> org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:904) >>>> at >>>> >>>> org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:359) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460) >>>> at >>>> >>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398) >>>> ... 23 more >>>> Caused by: org.apache.mailet.MailetException: Could not load matcher >>>> (CrypMatcher); >>>> nested exception is: >>>> java.lang.ClassNotFoundException: Requested matcher not found: >>>> CrypMatcher. Package searched: org.apache.james.transport.matchers. >>>> org.apache.james.mailet.crypto.matchers. >>>> com.thoughtworks.imap.crypmatcher. >>>> at >>>> >>>> org.apache.james.transport.AbstractLoader.loadFailed(AbstractLoader.java:146) >>>> at >>>> >>>> org.apache.james.transport.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:77) >>>> at >>>> >>>> org.apache.james.transport.camel.AbstractProcessorRouteBuilder.configure(AbstractProcessorRouteBuilder.java:133) >>>> ... 31 more >>>> Caused by: java.lang.ClassNotFoundException: Requested matcher not >>>> found: >>>> CrypMatcher. Package searched: org.apache.james.transport.matchers. >>>> org.apache.james.mailet.crypto.matchers. >>>> com.thoughtworks.imap.crypmatcher. >>>> at >>>> >>>> org.apache.james.transport.AbstractLoader.classNotFound(AbstractLoader.java:133) >>>> at >>>> >>>> org.apache.james.transport.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:73) >>>> ... 32 more >>>> ___________*_______________ >>>> thanks in advance >>>> ranjib >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
