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

XMLDomainList throws NPE if no domainname was specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0-M1, 3.0.0, Trunk
    • 3.0-M1
    • None
    • None

    Description

      INFO 01:34:47,616 | james.James | JAMES init...
      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.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'spoolmanager': Injection of resource dependencies
      failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'matcherpackages': Injection of resource dependencies failed;
      nested exception is org.springframework.beans.factory.BeanCreationException:
      Error creating bean with name 'mailetcontext': Injection of resource
      dependencies failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'mailserver': Invocation of init method failed; nested exception
      is java.lang.NullPointerException
      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.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'spoolmanager': Injection of resource dependencies failed; nested
      exception is org.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'matcherpackages': Injection of resource
      dependencies failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'mailetcontext': Injection of resource dependencies failed; nested
      exception is org.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'mailserver': Invocation of init method failed;
      nested exception is java.lang.NullPointerException
      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.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'spoolmanager': Injection of resource dependencies
      failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'matcherpackages': Injection of resource dependencies failed;
      nested exception is org.springframework.beans.factory.BeanCreationException:
      Error creating bean with name 'mailetcontext': Injection of resource
      dependencies failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'mailserver': Invocation of init method failed; nested exception
      is java.lang.NullPointerException
      at
      org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)
      at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
      at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
      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:193)
      at
      org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008)
      at
      org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:41)
      at
      org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:104)
      at
      org.apache.camel.model.RouteBuilderDefinition.createRouteBuilder(RouteBuilderDefinition.java:64)
      at
      org.apache.camel.spring.CamelContextFactoryBean.installRoutes(CamelContextFactoryBean.java:877)
      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.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'matcherpackages': Injection of resource
      dependencies failed; nested exception is
      org.springframework.beans.factory.BeanCreationException: Error creating bean
      with name 'mailetcontext': Injection of resource dependencies failed; nested
      exception is org.springframework.beans.factory.BeanCreationException: Error
      creating bean with name 'mailserver': Invocation of init method failed;
      nested exception is java.lang.NullPointerException

      • Zitierten Text anzeigen -
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)
        at
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
        at
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        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:193)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:432)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:406)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:538)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:159)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:294)
        ... 38 more
        Caused by: org.springframework.beans.factory.BeanCreationException: Error
        creating bean with name 'mailetcontext': Injection of resource dependencies
        failed; nested exception is
        org.springframework.beans.factory.BeanCreationException: Error creating bean
        with name 'mailserver': Invocation of init method failed; nested exception
        is java.lang.NullPointerException
      • Zitierten Text anzeigen -
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)
        at
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
        at
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        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:193)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:432)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:406)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:538)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:159)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:294)
        ... 51 more
        Caused by: org.springframework.beans.factory.BeanCreationException: Error
        creating bean with name 'mailserver': Invocation of init method failed;
        nested exception is java.lang.NullPointerException
        at
        org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
        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)
        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:193)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:432)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:406)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:538)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:159)
        at
        org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
        at
        org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:294)
        ... 64 more
        Caused by: java.lang.NullPointerException
        at java.util.ArrayList.<init>(ArrayList.java:131)
        at
        org.apache.james.domain.XMLDomainList.getDomainListInternal(XMLDomainList.java:69)
        at
        org.apache.james.domain.AbstractDomainList.getDomains(AbstractDomainList.java:65)
        at
        org.apache.james.AbstractMailServer.getDefaultDomain(AbstractMailServer.java:417)
        at
        org.apache.james.AbstractMailServer.initializeServernames(AbstractMailServer.java:235)
        at
        org.apache.james.AbstractMailServer.init(AbstractMailServer.java:198)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
        org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
        at
        org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
        at
        org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
        ... 78 more

      Attachments

        Activity

          People

            norman Norman Maurer
            norman Norman Maurer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: