I am configuring XMLVirtualUserTable on James Mail server for which I made following changes in mailetcontainer.xml file:
<mailet match="All" class="XMLVirtualUserTable">
<mapping>[email protected][email protected]</mapping>
<mapping>[email protected][email protected]</mapping>
</mailet>
<!-- Send remaining mails to the transport processor for either local or remote delivery -->
<mailet match="RecipientIsRegex=(.*)@test1.com" class="Forward">
<forwardTo>[email protected]</forwardTo>
</mailet>
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
</processor>
after changes when I restart the James I got the following error:
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:40)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.app.spring.JamesAppSpringMain.init(JamesAppSpringMain.java:56)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.app.spring.JamesAppSpringMain.main(JamesAppSpringMain.java:42)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/java.lang.reflect.Method.invoke(Method.java:564)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/java.lang.Thread.run(Thread.java:844)
INFO | jvm 1 | 2020/11/26 09:01:36 | Caused by: org.apache.commons.configuration2.ex.ConfigurationException: Unable to init mailet XMLVirtualUserTable
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.parseConfiguration(AbstractStateMailetProcessor.java:335)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.init(AbstractStateMailetProcessor.java:116)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor.init(CamelMailetProcessor.java:106)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor.createMailProcessor(CamelCompositeProcessor.java:99)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.init(AbstractStateCompositeProcessor.java:157)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor.init(CamelCompositeProcessor.java:69)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/java.lang.reflect.Method.invoke(Method.java:564)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:344)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:295)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
INFO | jvm 1 | 2020/11/26 09:01:36 | ... 22 more
INFO | jvm 1 | 2020/11/26 09:01:36 | Caused by: org.apache.mailet.MailetException: Could not load mailet (XMLVirtualUserTable);
INFO | jvm 1 | 2020/11/26 09:01:36 | nested exception is:
INFO | jvm 1 | 2020/11/26 09:01:36 | java.lang.ClassNotFoundException: org.apache.james.transport.mailets.XMLVirtualUserTable
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.loadFailed(AbstractLoaderBeanFactory.java:62)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory.getMailet(MailetLoaderBeanFactory.java:52)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.parseConfiguration(AbstractStateMailetProcessor.java:327)
INFO | jvm 1 | 2020/11/26 09:01:36 | ... 34 more
INFO | jvm 1 | 2020/11/26 09:01:36 | Caused by: java.lang.ClassNotFoundException: org.apache.james.transport.mailets.XMLVirtualUserTable
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
INFO | jvm 1 | 2020/11/26 09:01:36 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.load(AbstractLoaderBeanFactory.java:45)
INFO | jvm 1 | 2020/11/26 09:01:36 | at org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory.getMailet(MailetLoaderBeanFactory.java:42)
so would you like to tell me what is the problem and how can we achieve this?
I followed the following James doc: https://james.apache.org/server/head/james-server-mailets-function/mailet-report.html#XMLVirtualUserTable