Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
vj - 05 May 2006 08:30 GMT
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
dnasmars@gmail.com - 05 May 2006 08:48 GMT
Hi,

you should try google with
"xml vs database advantages disadvantages"
as keywords.
I hope this helps
Jeff Kish - 05 May 2006 12:48 GMT
>Is there any alternative to solve this problem.I am getting the error
>java.nio.BufferOverflowException .This happens in my mail server when
[quoted text clipped - 10 lines]
>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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.