openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.J. Reed (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-922) setByteArrayInputStream being used in stead of setBytes
Date Mon, 16 Feb 2009 16:43:00 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

B.J. Reed updated OPENJPA-922:
------------------------------

    Attachment: OPENJPA-922.patch

For DB2, the DBDictionary useSetBytesForBlobs field is set to false.  Within setBytes, if
this flag is true, setBinaryStream() is called regardless of what kind of column we really
have (BYTES or BLOB_OBJECT).  Patch includes change to the if statement to also check the
column type before using the setBinaryStream and a simple test case.

Please apply to both 1.2.x and trunk

> setByteArrayInputStream being used in stead of setBytes
> -------------------------------------------------------
>
>                 Key: OPENJPA-922
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-922
>             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.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) java.io.ByteArrayInputStream@75947594]}
> It seems that the wrong kind of set is being used to set the parameter on the prepared
statement.

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


Mime
View raw message