Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0-M1, 3.0.0, Trunk
    • Fix Version/s: 3.0-M1
    • Labels:
      None

      Description

      It seems like the last refactoring broke the FileMailRepostory:

      28/10/09 18:38:05 INFO mailetpackages.RemoteDelivery: Exception
      caught in RemoteDelivery.run()
      java.lang.NullPointerException
      at org.apache.james.mailrepository.FileMailRepository.list(FileMailRepository.java:274)
      at org.apache.james.mailrepository.FileSpoolRepository.accept(FileSpoolRepository.java:140)
      at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:782)
      at java.lang.Thread.run(Thread.java:619)

        Activity

        Norman Maurer created issue -
        Hide
        Tim-Christian Mundt added a comment -

        The error is caused by this line:

        for (Iterator i = objectRepository.list(); i.hasNext(); )

        and specifically because "objectRepository" is null. The method that should populate objectRepository in init() has changed from

        private Object selectRepository(Store store, String type) throws ServiceException

        { DefaultConfiguration objectConfiguration = new DefaultConfiguration( "repository", "generated:AvalonFileRepository.compose()" ); objectConfiguration.setAttribute("destinationURL", destination); objectConfiguration.setAttribute("type", type); objectConfiguration.setAttribute("model", "SYNCHRONOUS"); return store.select(objectConfiguration); }

        to

        private Object selectRepository(Store store, String type) throws Exception

        { DefaultConfigurationBuilder objectConfiguration = new DefaultConfigurationBuilder(); objectConfiguration.addProperty("[@destinationURL]", destination); objectConfiguration.addProperty("[@type]", type); objectConfiguration.addProperty("[@model]", "SYNCHRONOUS"); return store.select(objectConfiguration); }

        Can't find the source for Store, so I can't go deeper. Any idea? This error still occurs and writes gigabytes of boring log files onto my hard drive.

        Show
        Tim-Christian Mundt added a comment - The error is caused by this line: for (Iterator i = objectRepository.list(); i.hasNext(); ) and specifically because "objectRepository" is null. The method that should populate objectRepository in init() has changed from private Object selectRepository(Store store, String type) throws ServiceException { DefaultConfiguration objectConfiguration = new DefaultConfiguration( "repository", "generated:AvalonFileRepository.compose()" ); objectConfiguration.setAttribute("destinationURL", destination); objectConfiguration.setAttribute("type", type); objectConfiguration.setAttribute("model", "SYNCHRONOUS"); return store.select(objectConfiguration); } to private Object selectRepository(Store store, String type) throws Exception { DefaultConfigurationBuilder objectConfiguration = new DefaultConfigurationBuilder(); objectConfiguration.addProperty("[@destinationURL]", destination); objectConfiguration.addProperty("[@type]", type); objectConfiguration.addProperty("[@model]", "SYNCHRONOUS"); return store.select(objectConfiguration); } Can't find the source for Store, so I can't go deeper. Any idea? This error still occurs and writes gigabytes of boring log files onto my hard drive.
        Hide
        Norman Maurer added a comment -

        I think I have an idea... I will need to take a deeper look later

        Show
        Norman Maurer added a comment - I think I have an idea... I will need to take a deeper look later
        Hide
        Norman Maurer added a comment -

        Hi Tim,

        could you grab the source from : http://svn.apache.org/repos/asf/james/server/sandbox/active/pure_spring_deployment/ and try if you get the same error with it ? Be aware it now use spring as container and all the config files are not locate in /path/to/james/conf directory.

        Thx,
        Norman

        Show
        Norman Maurer added a comment - Hi Tim, could you grab the source from : http://svn.apache.org/repos/asf/james/server/sandbox/active/pure_spring_deployment/ and try if you get the same error with it ? Be aware it now use spring as container and all the config files are not locate in /path/to/james/conf directory. Thx, Norman
        Hide
        Tim-Christian Mundt added a comment -

        Hi Norman,

        I downloaded and built the spring deployment successfully (considerably faster than current trunk). Can't find any error any more. I'll do some more testing and stuff but I assume the problem is solved.

        Thanks a lot
        Tim

        Show
        Tim-Christian Mundt added a comment - Hi Norman, I downloaded and built the spring deployment successfully (considerably faster than current trunk). Can't find any error any more. I'll do some more testing and stuff but I assume the problem is solved. Thanks a lot Tim
        Hide
        Norman Maurer added a comment -

        Fixed in trunk

        Show
        Norman Maurer added a comment - Fixed in trunk
        Norman Maurer made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.0-M1 [ 12314294 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12480796 ] Default workflow, editable Closed status [ 12566414 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12566414 ] jira [ 12581817 ]

          People

          • Assignee:
            Norman Maurer
            Reporter:
            Norman Maurer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development