You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Barry (JIRA)" <se...@james.apache.org> on 2011/02/14 07:32:57 UTC

[jira] Created: (JAMES-1193) Some wrong is AbstractQuota

Some wrong is AbstractQuota
---------------------------

                 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Issue Comment Edited: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995679#comment-12995679 ] 

Norman Maurer edited comment on JAMES-1193 at 2/17/11 6:33 AM:
---------------------------------------------------------------

Just implemented this two things. See JAMES-1197 and JAMES-1198

      was (Author: norman):
    Just implement this two things. See JAMES-1197 and JAMES-1198
  
> 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
>            Assignee: Norman Maurer
>            Priority: Minor
>             Fix For: 3.0-M3
>
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved JAMES-1193.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-M3
         Assignee: Norman Maurer

Fixed.. thanks for reporting

> 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
>            Assignee: Norman Maurer
>            Priority: Minor
>             Fix For: 3.0-M3
>
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995679#comment-12995679 ] 

Norman Maurer commented on JAMES-1193:
--------------------------------------

Just implement this two things. See JAMES-1197 and JAMES-1198

> 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
>            Assignee: Norman Maurer
>            Priority: Minor
>             Fix For: 3.0-M3
>
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Barry (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barry updated JAMES-1193:
-------------------------

    Summary: Some wrong in AbstractStorageQuota.java  (was: Some wrong is AbstractQuota)

> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Barry (JIRA)" <se...@james.apache.org>.
    [ 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Barry (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995110#comment-12995110 ] 

Barry commented on JAMES-1193:
------------------------------

In fact, the wrong is just in below line:

private final MailetContextLog log = new MailetContextLog(getMailetContext());

When initializing, the method getMailetContext() returns a NULL variable. I just commented this line, and moved the logic to the place where the log variable is be used.

> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994913#comment-12994913 ] 

Norman Maurer commented on JAMES-1193:
--------------------------------------

Could you please show use the stacktrace ?

> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-1193) Some wrong in AbstractStorageQuota.java

Posted by "Barry (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/JAMES-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995641#comment-12995641 ] 

Barry commented on JAMES-1193:
------------------------------

In the method getUsed, there are the code as below:
MessageManager mailbox = manager.getMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE,
                                                session.getUser().getUserName(), "INBOX"),
                                                session);

I think it is not applicable for James3. I think should modified as the below:

            MessageManager mailbox = manager.getMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE,
                                                session.getUser().getUserName()+"@"+recipient.getDomain(), "INBOX"),
                                                session);

but I am not sure whether or not there is better method still? Another question, because on IMAP, multiple folders can be created, not just "INBOX", how to calculate the used space?

> 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
>            Assignee: Norman Maurer
>            Priority: Minor
>             Fix For: 3.0-M3
>
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org