On Saturday, May 7, 2016, peter.penzov <
peter.penzov@gmail.com> wrote:
Did you managed to successfully implement similar code? Can you give some
advice how to fix it?
This is not self-contained so advice is hard to give.
I would suggest removing the extraneous stuff, like http, and getting the basic SQL to work reliably in a pure jdbc/Java main (or junit...) program first.
The oid error implies large object usage which is not jdbc compatible. Either make the column bytea or learn how to use the PostgreSQL driver's large object API. I'm guessing a bit here because, as I said, your example is lacking detail. I've had no issues with bytea though I haven't made use of streams.
David J.