Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Labels:
      None

      Description

      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>

      -------------------

      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

      ------

      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

        Activity

        Hide
        bago Stefano Bagnara added a comment -

        FetchMail was no longer working due to object.service() => ContainerUtil.service() change and FetchMail not implementig Serviceable.

        Show
        bago Stefano Bagnara added a comment - FetchMail was no longer working due to object.service() => ContainerUtil.service() change and FetchMail not implementig Serviceable.
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            bago Stefano Bagnara
            Reporter:
            bago Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development