james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Levesque (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-2384) When there is no body, getting a NullPointerException
Date Mon, 23 Apr 2018 23:31:00 GMT
Simon Levesque created JAMES-2384:
-------------------------------------

             Summary: When there is no body, getting a NullPointerException
                 Key: JAMES-2384
                 URL: https://issues.apache.org/jira/browse/JAMES-2384
             Project: James Server
          Issue Type: Bug
          Components: mailbox
    Affects Versions: master
            Reporter: Simon Levesque
             Fix For: master


h1. Steps to reproduce:

Send an empty email:
{noformat}
msmtp --read-envelope-from a2@foilen-lab.com << _EOF
from: a1@foilen-lab.com
to: a2@foilen-lab.com
subject: Empty from msmtp
_EOF{noformat}
This email is well sent by msmtp and accepted by James.

 

In the client, we can see the email (date, sender, subject), but when we want to see the body,
we are getting this exception since the "body" is null:
{noformat}
INFO | jvm 1 | 2018/04/23 22:56:59 | java.lang.NullPointerException
INFO | jvm 1 | 2018/04/23 22:56:59 | at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage.getBodyContent(JPAMailboxMessage.java:94)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage.getFullContent(AbstractJPAMailboxMessage.java:477)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.mailbox.store.streaming.InputStreamContent.getInputStream(InputStreamContent.java:62)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.fetch.ContentBodyElement.getInputStream(ContentBodyElement.java:60)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imapserver.netty.ChannelImapResponseWriter.write(ChannelImapResponseWriter.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.ImapResponseComposerImpl.literal(ImapResponseComposerImpl.java:312)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.FetchResponseEncoder.encodeBodyElements(FetchResponseEncoder.java:271)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.FetchResponseEncoder.doEncode(FetchResponseEncoder.java:86)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:52)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.chainEncode(AbstractChainedImapEncoder.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.encode.base.AbstractChainedImapEncoder.encode(AbstractChainedImapEncoder.java:54)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.main.ResponseEncoder.respond(ResponseEncoder.java:47)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.fetch.FetchProcessor.processMessageRanges(FetchProcessor.java:167)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.fetch.FetchProcessor.doProcess(FetchProcessor.java:119)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.fetch.FetchProcessor.doProcess(FetchProcessor.java:1)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:110)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.AbstractMailboxProcessor.process(AbstractMailboxProcessor.java:97)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:89)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:1)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:59)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:68)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.apache.james.imapserver.netty.ImapChannelUpstreamHandler.messageReceived(ImapChannelUpstreamHandler.java:196)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
INFO | jvm 1 | 2018/04/23 22:56:59 | at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
INFO | jvm 1 | 2018/04/23 22:56:59 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO | jvm 1 | 2018/04/23 22:56:59 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO | jvm 1 | 2018/04/23 22:56:59 | at java.lang.Thread.run(Thread.java:748){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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