Problem establishing connection - Mailing list pgsql-jdbc

From Pinki
Subject Problem establishing connection
Date
Msg-id 16701015.post@talk.nabble.com
Whole thread Raw
Responses Re: Problem establishing connection
List pgsql-jdbc
My aplication is a simple Desktop Aplication using the Database Aplication
Wizard with NetBeans 6.0.1. i declared my db at sevices tab and worked fine,
but when i run the aplication i get this stack trace

Any help?


15/04/2008 10:59:38 AM org.jdesktop.application.Application$1 run
GRAVE: Application class monitor.MonitorApp failed to launch
Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs
(09/07/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: El intento de
conexión falló.
Error Code: 0
        at
oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
        at
oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
        at
oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
        at
oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
        at
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
        at

oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
        at monitor.MonitorView.initComponents(MonitorView.java:285)
        at monitor.MonitorView.<init>(MonitorView.java:35)
        at monitor.MonitorApp.startup(MonitorApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: org.postgresql.util.PSQLException: El intento de conexión falló.
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:137)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:124)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:29)
        at
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:386)
        at org.postgresql.Driver.connect(Driver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at
oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
        ... 20 more
Caused by: java.net.SocketException: Malformed reply from SOCKS server
        at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:429)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:180)
        at org.postgresql.core.PGStream.<init>(PGStream.java:62)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
        ... 30 more
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class
monitor.MonitorApp failed to launch
        at org.jdesktop.application.Application$1.run(Application.java:177)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build
b58g-fcs (09/07/2007))):
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: El intento de
conexión falló.
Error Code: 0
        at
oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
        at
oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
        at
oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
        at
oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
        at
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
        at
oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
        at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
        at

oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
        at monitor.MonitorView.initComponents(MonitorView.java:285)
        at monitor.MonitorView.<init>(MonitorView.java:35)
        at monitor.MonitorApp.startup(MonitorApp.java:19)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        ... 8 more
Caused by: org.postgresql.util.PSQLException: El intento de conexión falló.
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:137)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:124)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:29)
        at
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:386)
        at org.postgresql.Driver.connect(Driver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at
oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)
        ... 20 more
Caused by: java.net.SocketException: Malformed reply from SOCKS server
        at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:429)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:180)
        at org.postgresql.core.PGStream.<init>(PGStream.java:62)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
        ... 30 more
BUILD SUCCESSFUL (total time: 35 seconds)

--
View this message in context: http://www.nabble.com/Problem-establishing-connection-tp16701015p16701015.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


pgsql-jdbc by date:

Previous
From: "Tim H"
Date:
Subject: Failover Datasource?
Next
From: Kris Jurka
Date:
Subject: Re: invalid message format and I/O error while comunicating with backend