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

V

vj

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 six\ze 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.<init>([BIILjava.lang.String;)V(Unknown Source)

at java.lang.String.<init>([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.<init>(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
 
D

dnasmars

Hi,

you should try google with
"xml vs database advantages disadvantages"
as keywords.
I hope this helps
 
J

Jeff Kish

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 six\ze 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
<snip>
I don't know if this is a jdbc driver limitation or what.

Try storing a series of blobs, if blobs are the best for your internal usage.

You also could compress/decompress the data since it is in a blob, and not
expected to by useful to queries in that state, is it?

hth
Jeff Kish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top