james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <server-...@james.apache.org>
Subject [jira] Created: (JAMES-446) NPE while fetching mail (FetchMail)
Date Wed, 22 Feb 2006 21:03:37 GMT
NPE while fetching mail (FetchMail)

         Key: JAMES-446
         URL: http://issues.apache.org/jira/browse/JAMES-446
     Project: James
        Type: Bug
  Components: Matchers/Mailets (bundled)  
    Versions: 2.3.0a1    
    Reporter: Stefano Bagnara
    Priority: Minor

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.
  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

  <fetchmail enabled="true">          <fetch name="flix-noc.com">
              <account customrcpt-header="X-Envelope-To"
              <property name="mail.pop3.connectiontimeout" value="180000"/>
              <property name="mail.pop3.timeout" value="180000"/>                  
          <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"/>
reject="true" leaveonserver="true" markseen="false" />
          <remoterecipient reject="true" leaveonserver="true" markseen="false" />


Let's see:
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

  <!-- FetchMail Service -->
  <block name="fetchmail" class="org.apache.james.fetchmail.FetchScheduler" >
    <provide name="scheduler"

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

  <!-- 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"

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?


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message