Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

org.postgresql.util.PSQLException: An I/O error occured while sending to..

772199Nov 18 2010 — edited Nov 26 2010
Hi,
I have a Java console application which copies data from a PostgreSQL database to an Oracle database. I'm trying to copy a big table with 121,681,835 rows but the program fails after copying 8,760,000 rows. The SELECT fetch is 60,000 and QueryTimeOut is set to 0. I'm using postgresql-8.4-701.jdbc4.jar driver and springs framework 2.5.6. Below is the error stack

org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2002)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.next(AbstractJdbc2ResultSet.java:1833)
at com.backcountry.datamigration.TableMigrator.run(TableMigrator.java:98)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1657)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:746)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:135)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:104)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:186)
at org.postgresql.core.PGStream.Receive(PGStream.java:445)
at org.postgresql.core.PGStream.ReceiveTupleV3(PGStream.java:350)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1774)
at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:1997)

Can anyone provide some insights on this error ?

Thanks,
RK

Comments

392879
You can achieve this using reports plugin security. You have to implement Reports security interface and provide custom implementation. SSO userid will be passed automatically to security plugin and you can perform authorization check in jobCommandCheck method implementation.

Security API doc,
http://download-west.oracle.com/docs/cd/B14099_17/bi.1012/b14049/oracle/reports/server/Security.html

Details on reports security configuration
http://download-west.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_conf.htm#sthref247
524285
Thanks for the reply. The application server is shared with other LOB who do not require the additional security. Can we put authorization on a certain list of reports while all other reports deployed on the application server are just using SSO authentication?
406582
I was looking at the example
http://www.oracle.com/technology/products/reports/apis/plugSecurity/resources.html

where do I get the classes that are referenced in SecurityPlugin.java class?


package oracle.reports.plugin.security.xml;

import oracle.reports.server.Security;
import oracle.reports.server.Job;

import oracle.reports.RWException;
import oracle.reports.utility.Utility;
import oracle.reports.utility.CommandParser;

import java.util.Properties;
import java.sql.Time;

import java.io.FileReader;
import java.io.File;
import java.io.StringReader;
import java.io.FileNotFoundException;
import java.io.IOException;

// imports required for Oracle XML Parsers

import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.NamedNodeMap;
import org.xml.sax.SAXException;

import oracle.xml.parser.v2.DOMParser;
import oracle.xml.parser.v2.XMLParseException;
import oracle.xml.parser.v2.XMLConstants;
import oracle.xml.parser.v2.XMLDocument;
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 24 2010
Added on Nov 18 2010
2 comments
3,620 views