xml when storing in string if grows beyond 22 mb gives java.nio.Buffer

Is there any alternative to solve this problem.I am getting the error
java.nio.BufferOverflowException .This happens in my mail server when the file sixze of xml where i have stored data about spam/nonspam grows upto 22mb.I have stored this xml in database as blob.at server startup uploading in in my class.Keeps througout in JVM after every 50 th request saving information back to database(about spam/nonspam).Now if xml size grows i am storing this in string to parse etc.it gives this bug error.Sholud i cahnge my datatype or use something as XML Parser to split my xml in pieces(mechanism i am not aware of at all) so that string just takes some size of xml (but here can i use string builder etc.). Now is there any proper solution to this kind of problem whenever i removes some daya from xml spam mail goes to inbox and vice versa.
Please suggest me some solution if possible.

complete error is:
Servlet initialization failed:

java.nio.BufferOverflowException

at java.nio.charset.CoderResult.throwException(CoderResult.java:259)

at java.lang.StringCoding$CharsetSD.decode([BII)[C(Unknown Source)

at java.lang.StringCoding.decode(Ljava.lang.String;[BII)[C(Unknown Source)

at java.lang.String.([BIILjava.lang.String;)V(Unknown Source)

at java.lang.String.([BLjava.lang.String;)V(Unknown Source)

at zerocode.core.ByteBlock.toString(ByteBlock.java:89)

at zcCollab.mailProcessing.NaiveBayesClassifier._getInstanceData(NaiveBayesClassifier.java:275)

at zcCollab.mailProcessing.NaiveBayesClassifier.initialize(NaiveBayesClassifier.java:86)

at zcCollab.mailProcessing.SimpleDeliveryManager._setupClassifiers(SimpleDeliveryManager.java:409)

at zcCollab.mailProcessing.SimpleDeliveryManager.(SimpleDeliveryManager.java:62)

at zcCollab.zcApp.InfoManagerApp._createDeliveryProcessor(InfoManagerApp.java:307)

at zcCollab.zcApp.InfoManagerApp.initialize(InfoManagerApp.java:294)

at zerocode.udm.Application._createInstance(Application.java:168)

at zerocode.udm.Application.createInstanceForServlet(Application.java:111)

at zerocode.servlet.UdmServlet._createApplication(UdmServlet.java:67)

at zerocode.servlet.UdmServlet._initialize(UdmServlet.java:52)

at zerocode.servlet.GenericServlet.init(GenericServlet.java:116)

at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:292)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:329)

at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:657)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)

at org.mortbay.http.HttpServer.service(HttpServer.java:879)

at org.mortbay.http.handler.ForwardHandler.handle(ForwardHandler.java:130)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)

at org.mortbay.http.HttpServer.service(HttpServer.java:879)



Thanks
Vijendra

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories