email message lenght

I suppose the content of mail in mail connector is limited to the length of “String” type. This is truncating the email that I am sending.

Can anybody tell me how can we increase the allowed size/length of email message content?

I suppose it requires change of datatype of the Message from string to something else.

Refer following url:
http://documentation.bonitasoft.com/messaging-0

What?

Your email is longer than Integer.MAX_VALUE, which is 2^^31 - 1 = 2,147,483,647.

This is the max of String so you should be able to do it.

The problem is either in your code generating the string, or the Java Heap size (which in this case should be 4GB), or the physical memory on your PC.

http://www.coderanch.com/t/393042/java/java/maximum-length-String
http://stackoverflow.com/questions/15369117/what-is-the-maximum-amount-of-data-that-a-string-can-hold-in-java
http://stackoverflow.com/questions/816142/strings-maximum-length-in-java-calling-length-method
http://stackoverflow.com/questions/1179983/how-many-characters-can-a-java-string-have

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Thanks Sean for quick reply. Your hint helped me in resolving the issue.

It was a code related problem. My email is very big and is built using the html tags used as string and dynamic data from business object. The problem was that a + sign to concatenate data was missing at one place and hence mail was not getting prepared from that point on.

However as highlighted by you, in my workstation having 16GB RAM, I have increased heap size as below: file named as BonitaBPMCommunity.ini located in bonita root installation folder.

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
–launcher.XXMaxPermSize512m
-clearPersistedState
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Dfile.encoding=UTF8
-Xmx4096m
-Xms2048m
-XX:MaxPermSize=2048m
-Dgreclipse.nonlocking=true
-Djava.endorsed.dirs=endorsed

Correction,

Only if your email is 2,147,483,647 in size should you need 4GB for heap, it’s probably not needed otherwise…

regards

Thanks. Point noted!

Best regards,