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 "Tim-Christian Mundt (JIRA)" <se...@james.apache.org> on 2009/12/30 15:24:29 UTC
[jira] Commented: (JAMES-936) NPE when using FileMailRepository
[ https://issues.apache.org/jira/browse/JAMES-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795321#action_12795321 ]
Tim-Christian Mundt commented on JAMES-936:
-------------------------------------------
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.
> NPE when using FileMailRepository
> ---------------------------------
>
> Key: JAMES-936
> URL: https://issues.apache.org/jira/browse/JAMES-936
> Project: JAMES Server
> Issue Type: Bug
> Components: MailStore & MailRepository
> Affects Versions: 3.0, 3.0-M1, Trunk
> Reporter: Norman Maurer
> Assignee: Norman Maurer
> Priority: Blocker
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org