Quynh Nguyen created JAMES-2048:
-----------------------------------

             Summary: Message is saved success but it did not be retrieved 
right after that
                 Key: JAMES-2048
                 URL: https://issues.apache.org/jira/browse/JAMES-2048
             Project: James Server
          Issue Type: Bug
            Reporter: Quynh Nguyen


In the log we have:
{code:java}
Error while processing listener 
org.apache.james.mailbox.elasticsearch.events.ElasticSearchListeningMessageSearchIndex
 for org.apache.james.mailbox.store.event.EventFactory.AddedImpl

Caused by: java.lang.IllegalArgumentException: 'cidAsString' is mandatory

at org.apache.james.mailbox.model.Cid.from(Cid.java:30)

        at java.lang.Thread.run(Thread.java:745) Caused by: 
java.lang.IllegalArgumentException: 'cidAsString' is mandatory 
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) 
        at org.apache.james.mailbox.model.Cid.from(Cid.java:30) at 
java.util.Optional.map(Optional.java:215) 
        at 
org.apache.james.mailbox.cassandra.mail.CassandraMessageDAO.messageAttachmentByIdFrom(CassandraMessageDAO.java:273)
        at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
        at 
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
        at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
        at 
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
       at 
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
       at 
org.apache.james.mailbox.cassandra.mail.CassandraMessageMapper.lambda$retrieveMessages$4(CassandraMessageMapper.java:181)
 
{code}

Link to the log: 
https://openpaas.linagora.com/viewlogs/app/kibana#/doc/logs-*/logs-2017-05-18/tester/?id=AVwa9PGjzFPejjEzjY_0


I would like first to have MailboxID and UID of failed message. (And user in 
mailboxSession ?)

Then here is the stack trace (attached as a screen shot).

We can see that eventhough an Attachment have been correctly written, we are 
failing retrieving it.

Needless to say, we should not fail indexing on retrieving attachments...

Needless to say, we should not fail reading an attachment if we succeeded 
writing it.

We should :
 - enhance Log message with mailbox name, mailbox ID, user name and UID + 
messageId (separate PR)
 - try to reproduce valid write + failed read with unit tests on 
AttachmentMapper.
 - fix it!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to