Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1921

James Server 3 Beta 5 fails due to unsatisfied dependency creating mailqueuefactory

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-beta5
    • Fix Version/s: None
    • Component/s: Queue
    • Labels:
      None
    • Environment:
      Run James 3 beta5 binary on GNU/Linux

      Description

      trying to set the Mail Queue Factory to FileMailQueueFactory

      WARN 10:00:42,528 | org.apache.james.container.spring.context.JamesServerApplicationContext | Exception encountered during context initialization - cancelling refresh attempt
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailqueuefactory' defined in class path resource [META-INF/spring/file-queue-context.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.apache.james.queue.api.MailQueueItemDecoratorFactory]: : No qualifying bean of type [org.apache.james.queue.api.MailQueueItemDecoratorFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.james.queue.api.MailQueueItemDecoratorFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:752)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1077)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:981)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

      Please find the modified spring-server.xml I use.

      <!--
      ===========================================================================
      Queues
      ===========================================================================
      -->

      <!--
      Default Mail Queue Factory is the ActiveMQMailQueueFactory.
      Alternative queue is FileMailQueueFactory - Can be used instead of the default one.
      To use FileMailQueueFactory, replace the import of activemq-queue-context.xml with:
      -->
      <import resource="classpath:META-INF/spring/file-queue-context.xml"/>

      <!-- <import resource="classpath:META-INF/spring/activemq-queue-context.xml"/>-->

      <!-- Mailet Container -->
      <import resource="classpath:META-INF/spring/mailetcontainer-context.xml"/>

      <!-- Camel Context -->
      <camel:camelContext id="jamesCamelContext" trace="false">
      <camel:jmxAgent id="agent" disabled="false" createConnector="false" serviceUrlPath="/jmxrmi/jamescamel"/>
      </camel:camelContext>

      <!-- DNS Service -->
      <import resource="classpath:META-INF/spring/dns-context.xml"/>

      <!-- FetchMail -->
      <import resource="classpath:META-INF/spring/fetchmail-context.xml"/>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              romanazzi Pietro Romanazzi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: