Full xml contents not getting written into or read from CLOB column

85 views
Skip to first unread message

Prakash

unread,
Feb 19, 2010, 1:55:04 PM2/19/10
to H2 Database
This is my first post to h2 database group. so first, Thank you for
bringing up such a great product.

I recently faced this issue and hoped someone could point me in the
right direction,

Am using H2 database in one of my java desktop application, am writing
xml contents into a table. The column into which am writing the xml
contents has data type CLOB. After the writing task is complete, when
i query the table i see that for some rows, i am able to see the
entire xml content, but for some rows, i see contents only like this

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/...
(17525)

or

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/...
(15294)

and so on...

I don't know why this is happening. Is there a limit to number of
characters that can be written a CLOB data type column?

Please advice.

Thomas Mueller

unread,
Feb 22, 2010, 1:50:04 AM2/22/10
to h2-da...@googlegroups.com
Hi,

When displaying data, the H2 Console only shows the first 10000
characters. You can change that using the system property
h2.webMaxValueLength:
http://www.h2database.com/javadoc/org/h2/constant/SysProperties.html#h2.webMaxValueLength

The data in the database is not truncated, it is only to avoid out of
memory in the H2 Console application. But I see the value is a bit
low. I will change the default to 100'000 in the next release. If that
causes problems I will change it back.

Regards,
Thomas

Prakash

unread,
Feb 23, 2010, 12:46:47 AM2/23/10
to H2 Database
Hi Thomas,

Thank you, I was worried data was missing. We are good as long as the
data is in the database.
I agree with your initial idea of displaying just 10,000 characters to
have application stability instead of seeing out of memory exceptions.
User always has option to export data.

Very pleased with your application.

Thanks Again,
Prakash

On Feb 22, 12:50 am, Thomas Mueller <thomas.tom.muel...@gmail.com>
wrote:


> Hi,
>
> When displaying data, the H2 Console only shows the first 10000
> characters. You can change that using the system property

> h2.webMaxValueLength:http://www.h2database.com/javadoc/org/h2/constant/SysProperties.html#...

Reply all
Reply to author
Forward
0 new messages