james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin.Bergljung" <Martin.Berglj...@opsera.com>
Subject RE: IMAP FETCH BODYSTRUCTURE problem
Date Mon, 18 May 2009 09:35:59 GMT
Hi,

Turned off extensions in the FetchResponseEncoder.java and now it is
starting to work normally in Lotus Notes and I can open messages.

However, I get a NPE for some messages (multipart I think) as follows:

ERROR 10:06:07,367 | james.imapserver | Unexpected runtime exception:
null
java.lang.NullPointerException
        at
org.apache.james.imap.processor.fetch.ContentBodyElement.size(ContentBod
yElement.java:53)
        at
org.apache.james.imap.main.ChannelImapResponseWriter.literal(ChannelImap
ResponseWriter.java:207)
        at
org.apache.james.imap.encode.base.ImapResponseComposerImpl.literal(ImapR
esponseComposerImpl.java:433)
        at
org.apache.james.imap.encode.FetchResponseEncoder.encodeBodyElements(Fet
chResponseEncoder.java:259)
        at
org.apache.james.imap.encode.FetchResponseEncoder.doEncode(FetchResponse
Encoder.java:64)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:42)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode
(AbstractChainedImapEncoder.java:50)
        at
org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(Abst
ractChainedImapEncoder.java:44)
        at
org.apache.james.imap.main.ImapRequestHandler$ResponseEncoder.respond(Im
apRequestHandler.java:228)
        at
org.apache.james.imap.processor.fetch.FetchProcessor.doProcess(FetchProc
essor.java:96)
        at
org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(Abstr
actMailboxProcessor.java:123)
        at
org.apache.james.imap.processor.AbstractMailboxProcessor.process(Abstrac
tMailboxProcessor.java:82)
        at
org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(Abstr
actMailboxProcessor.java:75)
        at
org.apache.james.imap.processor.base.AbstractChainedProcessor.process(Ab
stractChainedProcessor.java:44)
        at
org.apache.james.imap.processor.base.AbstractChainedProcessor.process(Ab
stractChainedProcessor.java:46)
        at
org.apache.james.imap.main.ImapRequestHandler.doProcessRequest(ImapReque
stHandler.java:184)
        at
org.apache.james.imap.main.ImapRequestHandler.handleRequest(ImapRequestH
andler.java:108)
        at
com.opsera.omm.james.imapserver.ImapHandler.handleRequest(ImapHandler.ja
va:119)
        at
com.opsera.omm.james.imapserver.ImapHandler.handleProtocol(ImapHandler.j
ava:103)
        at
org.apache.james.socket.DelegatingJamesHandler.handleProtocol(Delegating
JamesHandler.java:60)
        at
org.apache.james.socket.AbstractJamesHandler.handleConnection(AbstractJa
mesHandler.java:262)
        at
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner
.run(ServerConnection.java:467)
        at
org.apache.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRu
nnable.java:57)
        at
org.apache.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:118)
DEBUG 10:06:07,450 | james.imapserver | Calling disposeWatchdog()
default Worker #8
DEBUG 10:06:07,452 | james.imapserver | Watchdog default Worker #8 is
exiting run().
DEBUG 10:06:07,453 | james.imap-connections | Ending connection on
127.0.0.1:143 from 127.0.0.1:50154


The new code seems to be better structured and more efficient. It is
more stateless and commands are not created for every request for
example. I think it is quite important to try and keep it stateless and
not create loads of objects all the time. For a couple of reasons,
memory consumption and speed.
I think the code is more scalable now where each request is basically
independent, before it seemed to be more sticky sessions like, or I have
misunderstood it:-)
The APIs have also improved a lot in the new implementation.

Thanks
/Martin




-----Original Message-----
From: Robert Burrell Donkin [mailto:robertburrelldonkin@gmail.com] 
Sent: 18 May 2009 09:52
To: James Developers List
Subject: Re: IMAP FETCH BODYSTRUCTURE problem

On Mon, May 18, 2009 at 9:30 AM, Martin.Bergljung
<Martin.Bergljung@opsera.com> wrote:
> Hi,
>
> If we could add a configuration parameter to be able to turn on and
off
> the return of extension data that would be good.
> I have lots of trial users with Lotus Notes clients so I need to find
a
> solution.

i'll take a look at that now
(https://issues.apache.org/jira/browse/IMAP-91)

if you do figure out some selective way to do this, that'd be great.
maybe we could talk clueful clients into user a new USER_AGENT
extension command...

> BTW. I did loads of changes and updates to FetchCommand.java and
> SimpleMessageAttributes.java in the old implementation
> to get it to work.

how are you finding the new code?

- robert

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


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


Mime
View raw message