EWS Message save throws Exception


#1

Hi team,
I am extracting messages using EWS client but sometimes in the middle of extraction it throws Exception :
Message Saving Error ::class com.aspose.email.system.exceptions.WebException: 2 CR found
com.aspose.email.internal.o.ze.b(Unknown Source)
com.aspose.email.internal.o.ze.c(Unknown Source)
com.aspose.email.internal.o.ze.a(Unknown Source)
com.aspose.email.internal.o.ze.b(Unknown Source)
com.aspose.email.internal.o.zbh.a(Unknown Source)
com.aspose.email.internal.o.zbi.invoke(Unknown Source)
com.aspose.email.system.zd.a(Unknown Source)
com.aspose.email.internal.ex.zc.a(Unknown Source)
com.aspose.email.internal.ah.zg.run(SourceFile:66)
java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

How do i deal with that ?, one more thing while extracting mails it consumes too much memory, is there any better way to extracting mails from EWS account


#2

@pradeepnegi,

Can you please share complete working sample project along with source file so that we may further investigate to help you out.


#3

Sir i can’t share sample project, This Exception occurs randomly, sometimes it occurs and sometimes not. can you tell what is the cause of this exception so that i can handle it.


#4

@pradeepnegi,

I have observed the stack trace shared by you and regret to share that without provision of access to test account and sample project, we may not be able to investigate the root cause of this randomly occurring issue and helping you further. Therefore, we request you to please provide requested information so that we may help you further in this regard.


#5

This is the demo Project Jar for this issue , Please run this jar from command prompt (cmd) so that you can get the Exception.
https://drive.google.com/open?id=17fJUGLr28H2ppA-LS39Laqx9zUMH7tdu


#6

@pradeepnegi,

I have tried executing the Jar file shared by you using Aspose.Email for Java 19.5 on my end. I have obtained different exception on my end as shared in following image. However, instead of JAR file, we need to have a sample code and access to test account with which you are able to reproduce the issue. We really wish to help you further and need requested inforamtion from you.


#7

Demo.zip (1003 Bytes)


#8

@pradeepnegi,

Thank you very much for sharing requested information. Appreciate your cooperation in this regard. I have tried to execute the shared example code with given credentials on my end and it failed to connect via client. I am getting below exception on connecting.

Moreover, when i directly tired to access the outlook using browser, it too gave error using provided credentials. Can you please check this on your end.


#9

I have checked this code , it’s working in my system, try this code : Demo.zip (1.0 KB)


#10

@pradeepnegi,

I have tried working with new sample shared by you and result is the same. The issue seems to be with user name and password. Can you please verify this on your end as I am getting 404 exception and also even through browser the shared credentials don’t work.


#11

This account is Outlook account, can you check this account in oulook.com


#12

@pradeepnegi,

There seems to be some account access issue and for that reason, I am unable to access that. Please check following image for your reference that is not allowing me to access shared account owing to security reason and asking for security code.

Can you please fix then and share with us.


#13

so can you tell me how can i give you another account.


#14

@pradeepnegi,

You may share account details and than remove extra security layers of your account so that we may access your account to further investigate to help you out.


#15

This text will be hidden

Summary

Sysdemo123@hotmail.com
S@12345678


#16

@pradeepnegi,

Thank you for sharing the new account details with us. I have tried using provided sample code on my end using Aspose.Email for Java 19.5 in Windows 7 VM. I have obtained following output on my end and with no issue incurring.

Downloading all messages from Inbox…
Root\13-06-2019 12-40
0
Root\13-06-2019 12-40\Sysdemo12@hotmail.com
0
Root\13-06-2019 12-40\Sysdemo12@hotmail.com\Inbox
11
Abx and another event today.
“Microsoft Outlook Calendar” no-reply@microsoft.com

Kernel Exchange Suite
“Amber Saxena” ambers@crm.kerneldatarecovery.com

Download Confirmation/Kernel Exchange Suite
“Amber Saxena” ambers@crm.kerneldatarecovery.com

Abx and another event today.
“Microsoft Outlook Calendar” no-reply@microsoft.com

Abx and another event today.
“Microsoft Outlook Calendar” no-reply@microsoft.com

Busy(Aspose.Email Evaluation) and another event today.
“Microsoft Outlook Calendar” no-reply@microsoft.com

Today: Busy(Aspose.Email Evaluation)
“Microsoft Outlook Calendar” no-reply@microsoft.com

Today: Busy(Aspose.Email Evaluation)
“Microsoft Outlook Calendar” no-reply@microsoft.com

Busy(Aspose.Email Evaluation) and another event today.
“Microsoft Outlook Calendar” no-reply@microsoft.com

One or more of the folders in your mailbox are named incorrectly.
“Microsoft Outlook” postmaster@outlook.com

“Golden, Carly A” Carly.Golden@providence.org

Root\13-06-2019 12-40\Sysdemo12@hotmail.com\Inbox\Test Folder
0


#17

Sir, I have told you this exception occurs randomly, sometimes it appears and sometimes not, Generally.


#18

@pradeepnegi,

I have not been able to reproduce the issue on number of iterations. However, an issue with ID EMAILJAVA-34554 has been created in our issue tracking system as investigation to further investigate and resolve the issue. This thread has been linked with issue so that you may be notified once the issue will be fixed.