db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: postgres bytea broken
Date Wed, 12 Apr 2006 15:23:26 GMT
On 4/12/06, Jason <jeacott@hardlight.com.au> wrote:

> >           <writeDataToFile
> >               outputFile="${database.backup.path}/src/schema/${database.backup.path}-data.xml">
> >               <converter jdbcType="BINARY" className="org.apache.ddlutils.io.converters.ByteArrayBase64Converter"/>
> >           </writeDataToFile>
> with the latest jdbc driver but no luck.
> throws exceptions of various ilks - Itried trapping themm and chasing a
> bit but it doesnt seem that a byte[] is even passed - maybe - dunno, I'm
> tired.

no, I think you're on the right track, only there is a bug in the
converter (or in commons-codec if you want) in that it does not
properly handle a null bytea value (i.e. the byte[] is null). This is
why you get the NullPointerException.
I can fix this tomorrow the earliest, but you could create your own
converter by adapting the ByteArrayBase64Converter and add
if-statements for textRep == null / obj == null in which case you
simply return null.


View raw message