2012-05-05 28 views
1

引用gnu.mail.providers.nntp的API文檔時,我試圖在localhost nntp上生成一個文件夾列表,其中我運行了leafnodegnu.mail.providers.nntp newsrc

然而,似乎$ {}的user.home/newsrc不正確加載,因爲我得到一個零長度數組:

store = session.getStore(new URLName(props.getProperty("nntp.host"))); 
store.connect(); 
root = store.getDefaultFolder(); 
Folder[] f = root.list(); 
LOG.warning("folders array " + f.length); 

如何調試的newsrc是否加載正確的商店?

屬性文件:

mail.smtp.auth=true 
mail.smtp.host=smtp.gmail.com 
mail.smtp.port=589 
mail.smtp.auth=true 
mail.imap.host=imap.gmail.com 
mail.imap.port=993 
mail.imap.connectiontimeout=5000 
mail.imap.timeout=5000 
[email protected] 
nntp.group=gwene.com.economist 
nntp.host=nntp://localhost/ 
mail.nntp.newsrc.file=/home/thufir/.newsrc 
jdbc.user=java 
jdbc.password=password 
jdbc.url=jdbc:mysql://localhost:3306/nntp?autoReconnect=true 
jdbc.jndiName=jdbc:mysql://localhost:3306/nntp?autoReconnect=true 

順便提及,給存儲區的連接是好的在屬性文件中指定的基團。

調試設置爲true給:

May 05, 2012 2:22:33 AM net.bounceme.dur.nntp.model.PropertiesReader getProps 
INFO: NNTP.loadMessages... 
DEBUG: nntp: newsrc loading /home/thufir/.newsrc 
DEBUG: nntp: newsrc load: 0 groups in 1ms 
May 05, 2012 2:22:35 AM net.bounceme.dur.nntp.controller.Usenet connect 
WARNING: folders array 0 
May 05, 2012 2:22:35 AM net.bounceme.dur.nntp.controller.Usenet loadFoldersList 
WARNING: folders 0 
May 05, 2012 2:22:35 AM net.bounceme.dur.nntp.controller.MessagesEnum <init> 
INFO: starting controller.. 

所以它看起來像newsrc正在加載,但0組。然而,問題的newsrc是像這樣:

[email protected]:~$ 
[email protected]:~$ cat .newsrc 
gwene.com.economist 1-1000000 
[email protected]:~$ 

回答

相關問題