Skip site navigation (1) Skip section navigation (2)

ayuda: Error de conexion postgres con java.

From: jairo vides <jairoeduardov(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: ayuda: Error de conexion postgres con java.
Date: 2010-07-15 16:42:55
Message-ID: AANLkTimIn-prxKCukcxXqURHHhOQVbpAgRYGJVQG8mqt@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
Hola estoy desarrollando una aplicacion en java con la cual intento subir a
postgresq un archivo cvs de mas o menos 100,000 registros
pero en determinado momento me lanza el siguente error. La aplicacion
trabaja bien durante las primeros 4000 inserciones.
sera alguna configuración de postgres? la configuraron de postgresql es la
que trae por defecto.
alguien me podría ayudar.

org.postgresql.util.PSQLException: El intento de conexión falló.
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
        at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
        at
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:393)
        at org.postgresql.Driver.connect(Driver.java:267)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at srcload.clsCapaDatos.conectarce(clsCapaDatos.java:41)
        at srcload.cargaDatos.objIdeCLiente(cargaDatos.java:106)
        at srcload.cargaDatos.exiHomonimo(cargaDatos.java:167)
        at srcload.Main.leer(Main.java:148)
        at srcload.Main.main(Main.java:26)
Caused by: java.net.NoRouteToHostException: Cannot assign requested address
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at java.net.Socket.<init>(Socket.java:392)
        at java.net.Socket.<init>(Socket.java:206)
        at org.postgresql.core.PGStream.<init>(PGStream.java:62)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
        ... 15 more
org.postgresql.util.PSQLException: El intento de conexión falló.
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
        at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
        at
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:393)
        at org.postgresql.Driver.connect(Driver.java:267)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at srcload.clsCapaDatos.conectarce(clsCapaDatos.java:41)
        at srcload.cargaDatos.obtTodosHomonimos(cargaDatos.java:156)
        at srcload.cargaDatos.exiHomonimo(cargaDatos.java:168)
        at srcload.Main.leer(Main.java:148)
        at srcload.Main.main(Main.java:26)
Caused by: java.net.NoRouteToHostException: Cannot assign requested address
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at java.net.Socket.<init>(Socket.java:392)
        at java.net.Socket.<init>(Socket.java:206)
        at org.postgresql.core.PGStream.<init>(PGStream.java:62)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76)
        ... 15 more
java.lang.NullPointerException
BUILD SUCCESSFUL (total time: 3 minutes 2 seconds)



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkpbysEACgkQoDfr0iXJqDW1eQCgmr/u5p4m51x6E27uiauUtrwh
2mEAoLSDqCGdai6S7bqgY6lWKzABqTDT
=KlzE
-----END PGP SIGNATURE-----

Responses

pgsql-es-ayuda by date

Next:From: German SalinasDate: 2010-07-15 17:05:58
Subject: Re: ayuda: Error de conexion postgres con java.
Previous:From: José Alberto Sánchez NietoDate: 2010-07-15 16:30:12
Subject: pasar date a integer directamente

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group