Quick tip: Openlog and the Field is too large (32k) POS.

Openlog is great. The work Paul Withers, Tim Tripcony, Nathan T Freeman, and Julian Robichaux have done in making it available for us to use in our Java programs is great too.

Sadly the “Field is too large …..” error sucks as badly as it ever has.

Capture

I’m writing large chunks of XML into the logMessage field which provokes this error.  I don’t need to see the XML in the view so the solution I’ve implemented is:

Edit the OpenLogItem class;

Find the writeToLog method;

Just before the logDoc.save(true) call insert this:

Item logMsg = logDoc.getFirstItem(“logMessage”);
logMsg.setSummary(false);

and recycle the logMsg Item using your favourite method.

Advertisements
Posted in Uncategorized
2 comments on “Quick tip: Openlog and the Field is too large (32k) POS.
  1. Hi Jason
    I’m working on a fix for this to post the message to logDocInfo field if greater than 32000 characters.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: