[ http://issues.apache.org/jira/browse/JAMES-342?page=comments#action_12433687 ] Stefano Bagnara commented on JAMES-342: ---------------------------------------
I tested james on oracle "9i" and oracle jdbc driver for "10.something" (can't remember the exact versions) and it was working fine. In fact oracle is the ONLY db I tested that fully supported writing/reading to blobs using streams (I remember that I needed to upgrade the jdbc driver to the latest 10.x for this). Other db I tested have really weird problems and those that support streams are in the end buffering the whole stream into a bytearray before writing it to db (so this does not make sense). Btw he didn't need to change the code to change the behaviour of the if: the "useBlob" is defined in the sqlResources.sql, so he could have changed sqlResources to change useBlob with useBytes and it would have worked the same. Imho we should close this one. > Running James and Oracle 9.2 on different machines > -------------------------------------------------- > > Key: JAMES-342 > URL: http://issues.apache.org/jira/browse/JAMES-342 > Project: James > Issue Type: Bug > Components: POP3Server > Affects Versions: 2.2.0 > Reporter: Olga Agady > > I didn't copy all the exception I was getting during testing, but the bug I > found I fixed, and I will try to describe it below: > I am running James and Oracle 9.2 on different machines. When I limit the > message size in the config file, I get the following exception in > POP3Handler: SQLException "Illegal use of LONG type". I believe that this is > an issue of running Oracle remotely (I found and article about > dbms_lob.getlength() describing this issue). When I disable limiting the > message size, I've got the IOException "Wrong column type". The exception is > thrown at MimeMessageJDBCSource.getInputStream() at the lines: > if (getBodyOption != null && > getBodyOption.equalsIgnoreCase("useBlob")) { > Blob b = rsRetrieveMessageStream.getBlob(1); > headers = b.getBytes(1, (int)b.length()); > } else { > headers = rsRetrieveMessageStream.getBytes(1); > } > I uncommented "if" statement and left only line: > headers = rsRetrieveMessageStream.getBytes(1); > Then I was able to get the messages from the inbox. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]