openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.J. Reed (JIRA)" <>
Subject [jira] Updated: (OPENJPA-922) setByteArrayInputStream being used in stead of setBytes
Date Mon, 02 Mar 2009 22:08:56 GMT


B.J. Reed updated OPENJPA-922:

    Attachment: OPENJPA-922-B.patch

I have attached OPENJPA-922-B.patch as a second attempt to fix this problem (also includes
the test case).  Basically, the DB2Dictionary needs to override the DBDictionary setBytes
and getBytes methods.  For setBytes, it can check the Column definition to use the proper
set, for getBytes, the Column is nowhere to be found so it just tries the original getBlob,
but if that fails, then it tries to getBytes as a last resort.  I'm sure there's a better
way for the get, but I haven't stumbled across it yet.

> setByteArrayInputStream being used in stead of setBytes
> -------------------------------------------------------
>                 Key: OPENJPA-922
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.0, 2.0.0
>         Environment: DB2 on Windows
>            Reporter: B.J. Reed
>            Assignee: B.J. Reed
>             Fix For: 1.2.0, 2.0.0
>         Attachments: OPENJPA-922-B.patch, OPENJPA-922.patch
> I have an Entity and one of its fields is defined as CHAR(16) FOR BIT DATA NOT NULL.
> When trying to persist the entity, I get the following error:
>    Error: SQLCODE=-301, SQLSTATE=07006, SQLERRMC=1, DRIVER=3.50.152  
>    {prepstmnt 1386959531 INSERT INTO NULLID.TESTTBL (tkiid) VALUES (?)  
>    [params=(InputStream)]}
> It seems that the wrong kind of set is being used to set the parameter on the prepared

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message