You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Felix Breske <ja...@flix-noc.com> on 2006/02/13 11:10:07 UTC

James 2.3.0a1 Fetchmail Exception

Hi,
i am working on an crm-import mailet vor opencustomer.org. On James 
2.2.0 i have problems when i try to read hibernate config files from a 
jar file.
So i tryed James 2.3.0a1 and it works fine. :-)

But now i have another problem.
Fetchmail throws a NullPointer Exception when fetching mails.
I try Windows XP and Linux with Java 1.5.0_06.

I found a mail on the mailinglist with the same exception (November, 2 , 
2005, Topic:"Fetchmail and IMAP"). But there was no solution.

Is it a James problem, or a problem with my configuration?

Thanks, Felix



fetchmail log file:
13/02/06 09:21:43 INFO  fetchmail: FetchMail Started
13/02/06 09:21:43 INFO  fetchmail.flix-noc.com: Fetcher starting fetches
13/02/06 09:21:43 ERROR fetchmail.flix-noc.com: An Exception has 
terminated this fetch.
java.lang.NullPointerException
   at 
org.apache.james.fetchmail.FetchMail.computeDynamicAccounts(FetchMail.java:747) 

   at 
org.apache.james.fetchmail.FetchMail.updateDynamicAccounts(FetchMail.java:723) 

   at 
org.apache.james.fetchmail.FetchMail.targetTriggered(FetchMail.java:525)
   at 
org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler.doRunEntry(DefaultTimeScheduler.java:449) 

   at 
org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler$1.run(DefaultTimeScheduler.java:412) 

   at 
org.apache.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:55) 

   at 
org.apache.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:116)
13/02/06 09:21:43 INFO  fetchmail.flix-noc.com: Fetcher completed fetches

james-fetchmail.xml:
   <fetchmail enabled="true">          <fetch name="flix-noc.com">
           <accounts>
               <account customrcpt-header="X-Envelope-To"
                              user="XXXX"
                              password="XXXX"
                              recipient="test@flix-noc.com"
                              ignorercpt-header="true"/>
           </accounts>
           <host>pop.flix-noc.com</host>
           <interval>60000</interval>
           <javaMailProviderName>pop3</javaMailProviderName>
           <javaMailFolderName>INBOX</javaMailFolderName>
           <javaMailProperties>
               <property name="mail.pop3.connectiontimeout" 
value="180000"/>
               <property name="mail.pop3.timeout" 
value="180000"/>                        
            </javaMailProperties>
            <fetchall>false</fetchall>
           <recursesubfolders>false</recursesubfolders>
           <fetched leaveonserver="false" markseen="true"/>
           <remotereceivedheader index="1" reject="true" 
leaveonserver="true" markseen="false"/>
           <maxmessagesize limit="0" reject="false" leaveonserver="true" 
markseen="false"/>
           <undeliverable leaveonserver="true" markseen="false"/>
           <recipientnotfound defer="true" reject="true" 
leaveonserver="true" 
markseen="false"/>                                              
                             
          <userundefined reject="true" leaveonserver="true" 
markseen="false" />
           <remoterecipient reject="true" leaveonserver="true" 
markseen="false" />
       </fetch>
   </fetchmail>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Stefano Bagnara <ap...@bago.org>.
Stefano Bagnara wrote:
> Felix Breske wrote:
>>> The parsedDynamicAccountParameters shouldn't be null, ever, so please 
>>> check you assembly and return your feedback.
>>>
>> Ok, the assembly.xml looks good.
>> It's getLocalUsers that return null.
>> It's the same problem with the latest trunk version.
>>
>> Any other ideas?
> 
> If the assembly is ok then the LocalUsers is null.
> 
> Can you post here your <users-store> section from config.xml?

Ok, I found the problem, fixed it and committed.
The nightly from tomorrow should fix this issue!



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Stefano Bagnara <ap...@bago.org>.
Felix Breske wrote:
>> The parsedDynamicAccountParameters shouldn't be null, ever, so please 
>> check you assembly and return your feedback.
>>
> Ok, the assembly.xml looks good.
> It's getLocalUsers that return null.
> It's the same problem with the latest trunk version.
> 
> Any other ideas?

If the assembly is ok then the LocalUsers is null.

Can you post here your <users-store> section from config.xml?

Are you using db or file for users repositories? and for mail repositories?

What files did you change?

Can you try telnetting to remote manager (4555), adding users and 
listing users from there? The lookup from FetchMail is the same that 
RemoteManager does, so it should throw the same error, but a test is 
welcome anyway to narrow the possibilities.

Stefano



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Felix Breske <ja...@flix-noc.com>.
> so the problem should be with getLocalUsers returning null or 
> getParsedDynamicAccountParameters() returning null.
>
> the localUserRepository is filled in the service method.
> If you have the corret configuration in the assembly.xml you should 
> have no problems.
>
> So, first thing, check that you updated your assembly.xml (this is a 
> lot different that 2.2.0 assembly.xml)
>
> The parsedDynamicAccountParameters shouldn't be null, ever, so please 
> check you assembly and return your feedback.
>
>
Ok, the assembly.xml looks good.
It's getLocalUsers that return null.
It's the same problem with the latest trunk version.

Any other ideas?

Felix



>> java.lang.NullPointerException
>>   at 
>> org.apache.james.fetchmail.FetchMail.computeDynamicAccounts(FetchMail.java:747) 
>>
>>   at 
>> org.apache.james.fetchmail.FetchMail.updateDynamicAccounts(FetchMail.java:723) 
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Felix Breske <ja...@flix-noc.com>.
Stefano Bagnara schrieb:

>
> So, first thing, check that you updated your assembly.xml (this is a 
> lot different that 2.2.0 assembly.xml)
>
>   <!-- FetchMail Service -->
>   <block name="fetchmail" 
> class="org.apache.james.fetchmail.FetchScheduler" >
>     <provide name="scheduler"
>
> role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
>     <provide name="James" role="org.apache.james.services.MailServer"/>
>     <provide name="localusersrepository" 
> role="org.apache.james.services.UsersRepository"/>
>   </block>
>
>   <!-- This is needed to link the smtpserver to the local user 
> repository -->
>   <block name="localusersrepository" 
> class="org.apache.james.core.LocalUsersRepository">
>     <provide name="users-store"
>              role="org.apache.james.services.UsersStore"/>
>   </block>
>
> The parsedDynamicAccountParameters shouldn't be null, ever, so please 
> check you assembly and return your feedback. 

I haven't touch the assembly.xml (it was still the default file), and it 
looks exactly like this.

For testing, i take the 2.3.0a1 package 
(http://people.apache.org/~noel/james/james-2.3.0a1.zip), added a dns 
server, a servername to the config.xml and my james-fetchmail.xml.
Thats all, the rest is default configuration. The result is still the 
exception.


Felix



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Felix Breske <ja...@flix-noc.com>.
> so the problem should be with getLocalUsers returning null or 
> getParsedDynamicAccountParameters() returning null.
>
> the localUserRepository is filled in the service method.
> If you have the corret configuration in the assembly.xml you should 
> have no problems.
>
> So, first thing, check that you updated your assembly.xml (this is a 
> lot different that 2.2.0 assembly.xml)
>
> The parsedDynamicAccountParameters shouldn't be null, ever, so please 
> check you assembly and return your feedback.
>
>
Ok, the assembly.xml looks good.
It's getLocalUsers that return null.
It's the same problem with the latest trunk version.

Any other ideas?

Felix



>> java.lang.NullPointerException
>>   at 
>> org.apache.james.fetchmail.FetchMail.computeDynamicAccounts(FetchMail.java:747) 
>>
>>   at 
>> org.apache.james.fetchmail.FetchMail.updateDynamicAccounts(FetchMail.java:723) 
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: James 2.3.0a1 Fetchmail Exception

Posted by Stefano Bagnara <ap...@bago.org>.
Felix Breske wrote:
> Hi,
> i am working on an crm-import mailet vor opencustomer.org. On James 
> 2.2.0 i have problems when i try to read hibernate config files from a 
> jar file.
> So i tryed James 2.3.0a1 and it works fine. :-)
> 
> But now i have another problem.
> Fetchmail throws a NullPointer Exception when fetching mails.
> I try Windows XP and Linux with Java 1.5.0_06.
> 
> I found a mail on the mailinglist with the same exception (November, 2 , 
> 2005, Topic:"Fetchmail and IMAP"). But there was no solution.
> 
> Is it a James problem, or a problem with my configuration?

Let's see:
FecthMail@747:
Map newAccounts = new HashMap(
    getLocalUsers().countUsers() * 
getParsedDynamicAccountParameters().size());

so the problem should be with getLocalUsers returning null or 
getParsedDynamicAccountParameters() returning null.

the localUserRepository is filled in the service method.
If you have the corret configuration in the assembly.xml you should have 
no problems.

So, first thing, check that you updated your assembly.xml (this is a lot 
different that 2.2.0 assembly.xml)

   <!-- FetchMail Service -->
   <block name="fetchmail" 
class="org.apache.james.fetchmail.FetchScheduler" >
     <provide name="scheduler"
 
role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
     <provide name="James" role="org.apache.james.services.MailServer"/> 

     <provide name="localusersrepository" 
role="org.apache.james.services.UsersRepository"/>
   </block>

   <!-- This is needed to link the smtpserver to the local user 
repository -->
   <block name="localusersrepository" 
class="org.apache.james.core.LocalUsersRepository">
     <provide name="users-store"
              role="org.apache.james.services.UsersStore"/>
   </block>

The parsedDynamicAccountParameters shouldn't be null, ever, so please 
check you assembly and return your feedback.

Stefano


> java.lang.NullPointerException
>   at 
> org.apache.james.fetchmail.FetchMail.computeDynamicAccounts(FetchMail.java:747) 
> 
>   at 
> org.apache.james.fetchmail.FetchMail.updateDynamicAccounts(FetchMail.java:723) 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org