[
https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995108#comment-12995108
]
Barry commented on JAMES-1193:
------------------------------
The stack is as below:
BeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<int>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
at org.apache.james.container.spring.Main.main(Main.java:39)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.james.transport.matchers.StorageQuotaFixed': Insta
ntiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.james.transport.
matchers.StorageQuotaFixed]: Constructor threw exception; nested exception is
java.lang.NullPointerException
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.load(AbstractLoaderBeanFactory.java:45)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory.getMatcher(MatcherLoaderBeanFactory.java:46)
... 28 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.apache.james.transport.matchers.StorageQuotaFixed]:
Const
ructor threw exception; nested exception is java.lang.NullPointerException
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 34 more
Caused by: java.lang.NullPointerException
at
org.apache.mailet.base.GenericMatcher.getMailetContext(GenericMatcher.java:83)
at
org.apache.james.transport.matchers.AbstractStorageQuota.<init>(AbstractStorageQuota.java:77)
at
org.apache.james.transport.matchers.StorageQuotaFixed.<init>(StorageQuotaFixed.java:8)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 36 more
ERROR 17:36:32,140 | james.mailprocessor | Caused by nested exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.james.transport.matchers.StorageQuotaFixed':
Instantiation of
bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.james.transport.matchers.St
orageQuotaFixed]: Constructor threw exception; nested exception is
java.lang.NullPointerException
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.load(AbstractLoaderBeanFactory.java:45)
at
org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory.getMatcher(MatcherLoaderBeanFactory.java:46)
at
org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.parseConfiguration(AbstractStateMailetProcessor.java:349)
at
org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor.init(AbstractStateMailetProcessor.java:119)
at
org.apache.james.mailetcontainer.camel.CamelMailetProcessor.init(CamelMailetProcessor.java:111)
at
org.apache.james.mailetcontainer.camel.CamelCompositeProcessor.createMailProcessor(CamelCompositeProcessor.java:110)
at
org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.init(AbstractStateCompositeProcessor.java:192)
at
org.apache.james.mailetcontainer.camel.CamelCompositeProcessor.init(CamelCompositeProcessor.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBea
nPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPost
Processor.java:293)
at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProc
essor.java:130)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanF
actory.java:394)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
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.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
at org.apache.james.container.spring.Main.main(Main.java:39)
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.apache.james.transport.matchers.StorageQuotaFixed]:
Const
ructor threw exception; nested exception is java.lang.NullPointerException
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 34 more
Caused by: java.lang.NullPointerException
at
org.apache.mailet.base.GenericMatcher.getMailetContext(GenericMatcher.java:83)
at
org.apache.james.transport.matchers.AbstractStorageQuota.<init>(AbstractStorageQuota.java:77)
at
org.apache.james.transport.matchers.StorageQuotaFixed.<init>(StorageQuotaFixed.java:8)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 36 more
> Some wrong in AbstractStorageQuota.java
> ---------------------------------------
>
> Key: JAMES-1193
> URL: https://issues.apache.org/jira/browse/JAMES-1193
> Project: JAMES Server
> Issue Type: Bug
> Components: Mailet Contributions
> Affects Versions: 3.0-M2
> Reporter: Barry
> Priority: Minor
>
> a customized matcher extends AbstractStorageQuota, then configured the
> matcher, but it thew a NPE.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]