Long delays to get JDBC connection.

My application uses Oracle 8.1.7 and Oracle JDBC Driver.
I am getting log delays to get a new connection after the application is run for 2-3 hours. There is no specific time intraval as such. The problem goes off after 10-15 mts.
Anybody experience such problems?
Thanks
Gens

Debugging ur problem u might come across that u r not closing the connection after u have finished ur work with the connection , so the connection remains INACTIVE till oracle removes all these type of connection from the connection instances.
to find the no of connections on the oracle database
log on as system or any user having dba grants
select MACHINE,LOGON_TIME,USERNAME from v$session where USERNAME = 'USERNAME';
the quoted USERNAME should be the username u r connecting to oracle. for the above u will come to know the no of connections open. u can configure oracle to close INACTIVE connection imeediately ot close conection made in Java immediately after finishing ur work in them. if u r using a connection pool such a thing is not neccessary as a closed connection is returned back to the pool. however connections made in java have to be closed explicitly.
good luck

Similar Messages

  • ODI11 jdbc Cannot Get Jdbc Connection Exception - HELP!

    Dear
    I'm trying to make a conexion a new facility in the ODI 11 in a new machine.
    that occurs when you try to configure the conexion at exactly the moment that will define the repository of work the following error occurs.
    ==
    Parameters
    Odi user and password - OK (checked and is correct)
    Repository User and Master password - ok (checked and is correct)
    Driver List - oracle.jdbc.OracleDriver
    URL>
    jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = sss.rrr3.ttttj.ggg.br) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RRR3) ))
    and
    Error Text>
    oracle.odi.core.config.MasterRepositoryResourceFailureException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Exception while getting connection: oracle.ucp.UniversalConnectionPoolException: Can not get connection Data Source
    at oracle.odi.core.repository.Repository.getMasterRepository (Repository.java: 74)
    at oracle.odi.core.OdiInstance.createMasterRepository (OdiInstance.java: 501)
    at oracle.odi.core.OdiInstance. <init> (OdiInstance.java: 553)
    at oracle.odi.core.OdiInstance.createInstance (OdiInstance.java: 529)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.jButtonRepository_ActionPerformed (SnpsDialogLoginDetail.java: 1209)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.connEtoC9 (SnpsDialogLoginDetail.java: 394)
    com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.access at $ 15 (SnpsDialogLoginDetail.java: 390)
    com.sunopsis.graphical.dialog.SnpsDialogLoginDetail at $ IvjEventHandler.actionPerformed (SnpsDialogLoginDetail.java: 186)
    at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java: 1995)
    javax.swing.AbstractButton at $ Handler.actionPerformed (AbstractButton.java: 2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java: 387)
    at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java: 242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonListener.java: 236)
    at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 272)
    at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 272)
    at java.awt.Component.processMouseEvent (Component.java: 6267)
    at javax.swing.JComponent.processMouseEvent (JComponent.java: 3267)
    at java.awt.Component.processEvent (Component.java: 6032)
    at java.awt.Container.processEvent (Container.java: 2041)
    at java.awt.Component.dispatchEventImpl (Component.java: 4630)
    at java.awt.Container.dispatchEventImpl (Container.java: 2099)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java: 4577)
    at java.awt.LightweightDispatcher.processMouseEvent (Container.java: 4238)
    at java.awt.LightweightDispatcher.dispatchEvent (Container.java: 4168)
    at java.awt.Container.dispatchEventImpl (Container.java: 2085)
    at java.awt.Window.dispatchEventImpl (Window.java: 2478)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.EventQueue.dispatchEvent (EventQueue.java: 599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchThread.java: 269)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java: 184)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java: 178)
    java.awt.Dialog at $ 1.run (Dialog.java: 1046)
    java.awt.Dialog at $ 3.Run (Dialog.java: 1098)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.awt.Dialog.show (Dialog.java: 1096)
    at java.awt.Component.show (Component.java: 1563)
    at java.awt.Component.setVisible (Component.java: 1515)
    at java.awt.Window.setVisible (Window.java: 842)
    at java.awt.Dialog.setVisible (Dialog.java: 986)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.snpsInitializeDisplayAll (SnpsDialogLoginDetail.java: 1475)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.snpsInitialize (SnpsDialogLoginDetail.java: 1421)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail.initialize (SnpsDialogLoginDetail.java: 1096)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail. <init> (SnpsDialogLoginDetail.java: 230)
    at com.sunopsis.graphical.dialog.SnpsDialogLoginDetail. <init> (SnpsDialogLoginDetail.java: 208)
    at oracle.odi.ui.LoginFactory.createLoginDetailDialog (LoginFactory.java: 218)
    at oracle.odi.ui.LoginFactory.createNewLogin (LoginFactory.java: 291)
    at com.sunopsis.graphical.dialog.SnpsDialogLogin.jToolBarButtonNew_ActionPerformed (SnpsDialogLogin.java: 853)
    at com.sunopsis.graphical.dialog.SnpsDialogLogin.connEtoC1 (SnpsDialogLogin.java: 166)
    com.sunopsis.graphical.dialog.SnpsDialogLogin at $ IvjEventHandler.actionPerformed (SnpsDialogLogin.java: 120)
    at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java: 1995)
    javax.swing.AbstractButton at $ Handler.actionPerformed (AbstractButton.java: 2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java: 387)
    at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java: 242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonListener.java: 236)
    at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 272)
    at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 272)
    at java.awt.Component.processMouseEvent (Component.java: 6267)
    at javax.swing.JComponent.processMouseEvent (JComponent.java: 3267)
    at java.awt.Component.processEvent (Component.java: 6032)
    at java.awt.Container.processEvent (Container.java: 2041)
    at java.awt.Component.dispatchEventImpl (Component.java: 4630)
    at java.awt.Container.dispatchEventImpl (Container.java: 2099)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java: 4577)
    at java.awt.LightweightDispatcher.processMouseEvent (Container.java: 4238)
    at java.awt.LightweightDispatcher.dispatchEvent (Container.java: 4168)
    at java.awt.Container.dispatchEventImpl (Container.java: 2085)
    at java.awt.Window.dispatchEventImpl (Window.java: 2478)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.EventQueue.dispatchEvent (EventQueue.java: 599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchThread.java: 269)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java: 184)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java: 178)
    java.awt.Dialog at $ 1.run (Dialog.java: 1046)
    java.awt.Dialog at $ 3.Run (Dialog.java: 1098)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.awt.Dialog.show (Dialog.java: 1096)
    at java.awt.Component.show (Component.java: 1563)
    at java.awt.Component.setVisible (Component.java: 1515)
    at java.awt.Window.setVisible (Window.java: 842)
    at java.awt.Dialog.setVisible (Dialog.java: 986)
    at com.sunopsis.graphical.dialog.SnpsAbstractDialog.setVisible (SnpsAbstractDialog.java: 299)
    at oracle.odi.ui.OdiConnectController.handleEvent (OdiConnectController.java: 114)
    at oracle.ide.controller.IdeAction.performAction (IdeAction.java: 529)
    at oracle.ide.controller.IdeAction.actionPerformedImpl (IdeAction.java: 884)
    at oracle.ide.controller.IdeAction.actionPerformed (IdeAction.java: 501)
    oracle.odi.ui.docking.AbstractOdiDockableWindow at $ 1.actionPerformed (AbstractOdiDockableWindow.java: 203)
    at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java: 1995)
    javax.swing.AbstractButton at $ Handler.actionPerformed (AbstractButton.java: 2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java: 387)
    at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java: 242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonListener.java: 236)
    at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 272)
    at java.awt.Component.processMouseEvent (Component.java: 6267)
    at javax.swing.JComponent.processMouseEvent (JComponent.java: 3267)
    at java.awt.Component.processEvent (Component.java: 6032)
    at java.awt.Container.processEvent (Container.java: 2041)
    at java.awt.Component.dispatchEventImpl (Component.java: 4630)
    at java.awt.Container.dispatchEventImpl (Container.java: 2099)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java: 4577)
    at java.awt.LightweightDispatcher.processMouseEvent (Container.java: 4238)
    at java.awt.LightweightDispatcher.dispatchEvent (Container.java: 4168)
    at java.awt.Container.dispatchEventImpl (Container.java: 2085)
    at java.awt.Window.dispatchEventImpl (Window.java: 2478)
    at java.awt.Component.dispatchEvent (Component.java: 4460)
    at java.awt.EventQueue.dispatchEvent (EventQueue.java: 599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchThread.java: 269)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java: 184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java: 174)
    at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java: 169)
    at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java: 161)
    at java.awt.EventDispatchThread.run (EventDispatchThread.java: 122)
    Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Exception while getting connection: oracle.ucp.UniversalConnectionPoolException: Unable to get Connection from Data Source
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection (DataSourceUtils.java: 82)
    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java: 524)
    at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java: 588)
    at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java: 613)
    at org.springframework.jdbc.core.JdbcTemplate.query (JdbcTemplate.java: 645)
    at org.springframework.jdbc.object.SqlQuery.execute (SqlQuery.java: 111)
    at org.springframework.jdbc.object.SqlQuery.execute (SqlQuery.java: 121)
    at org.springframework.jdbc.object.SqlQuery.execute (SqlQuery.java: 136)
    oracle.odi.core.repository.support.RepositoryUtils at $ RepositoryInfoSource.loadRepositoryInfo (RepositoryUtils.java: 179)
    at oracle.odi.core.repository.support.RepositoryUtils.loadMasterRepositoryInfo (RepositoryUtils.java: 373)
    at oracle.odi.core.repository.Repository.getMasterRepository (Repository.java: 72)
    ... 113 more
    Caused by: java.sql.SQLException: Exception while getting connection: oracle.ucp.UniversalConnectionPoolException: Unable to get Connection from Data Source
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection (LoginTimeoutDatasourceAdapter.java: 133)
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection (LoginTimeoutDatasourceAdapter.java: 62)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection (DataSourceUtils.java: 113)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection (DataSourceUtils.java: 79)
    ... 123 more
    Caused by: java.sql.SQLException: Exception while getting connection: oracle.ucp.UniversalConnectionPoolException: Unable to get Connection from Data Source
    at oracle.ucp.util.UCPErrorHandler.newSQLException (UCPErrorHandler.java: 541)
    at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException (PoolDataSourceImpl.java: 587)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection (PoolDataSourceImpl.java: 668)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection (PoolDataSourceImpl.java: 613)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection (PoolDataSourceImpl.java: 607)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
    at java.lang.reflect.Method.invoke (Method.java: 597)
    oracle.odi.core.datasource.support.RuntimeClassLoaderDataSourceCreator at $ DataSourceInvocationHandler.invoke (RuntimeClassLoaderDataSourceCreator.java: 41)
    Proxy0.getConnection at $ (Unknown Source)
    oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter at $ ConnectionProcessor.run (LoginTimeoutDatasourceAdapter.java: 217)
    java.util.concurrent.Executors at $ RunnableAdapter.call (Executors.java: 441)
    java.util.concurrent.FutureTask at $ Sync.innerRun (FutureTask.java: 303)
    at java.util.concurrent.FutureTask.run (FutureTask.java: 138)
    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: 662)
    Caused by: oracle.ucp.UniversalConnectionPoolException: Unable to get Connection from Data Source
    at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException (UCPErrorHandler.java: 421)
    at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException (UCPErrorHandler.java: 389)
    at oracle.ucp.jdbc.DriverConnectionFactoryAdapter.createConnection (DriverConnectionFactoryAdapter.java: 133)
    oracle.ucp.common.UniversalConnectionPoolImpl at $ UniversalConnectionPoolInternal.createOnePooledConnectionInternal (UniversalConnectionPoolImpl.java: 1570)
    $ UniversalConnectionPoolInternal.access oracle.ucp.common.UniversalConnectionPoolImpl at $ 600 (UniversalConnectionPoolImpl.java: 1378)
    at oracle.ucp.common.UniversalConnectionPoolImpl.createOnePooledConnection (UniversalConnectionPoolImpl.java: 445)
    at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests (UniversalConnectionPoolImpl.java: 302)
    at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection (UniversalConnectionPoolImpl.java: 129)
    at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection (JDBCConnectionPool.java: 119)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection (PoolDataSourceImpl.java: 655)
    ... 15 more
    Caused by: java.sql.SQLException: ORA-01017: password / username invalid; log-on denied
    at oracle.jdbc.driver.SQLStateMapping.newSQLException (SQLStateMapping.java: 70)
    at oracle.jdbc.driver.DatabaseError.newSQLException (DatabaseError.java: 133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java: 206)
    at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java: 455)
    at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java: 406)
    at oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java: 399)
    at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth (T4CTTIoauthenticate.java: 799)
    at oracle.jdbc.driver.T4CConnection.logon (T4CConnection.java: 368)
    at oracle.jdbc.driver.PhysicalConnection. <init> (PhysicalConnection.java: 508)
    at oracle.jdbc.driver.T4CConnection. <init> (T4CConnection.java: 203)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection (T4CDriverExtension.java: 33)
    at oracle.jdbc.driver.OracleDriver.connect (OracleDriver.java: 510)
    at oracle.ucp.jdbc.DriverConnectionFactoryAdapter.createConnection (DriverConnectionFactoryAdapter.java: 129)
    ... 22 more
    ==
    >
    I think the problem is in jdbc
    but exhausted my ideas on how to fix
    this
    where:
    ODI already reinstalled 11
    checked path in SO (JAVA_HOME, ODI_JAVA_HOME am using C: \ Program Files \ Java \ bin \ jdk1.6.0_23)
    ORACLE_CLASSES am using C: \ oracle \ product \ 10.2.0 \ client_1 \ jdbc \ lib \ ojdbc14.jar
    and
    ORACLE_HOME is using C: \ oracle \ product \ 10.2.0 \ client_1
    My OS is windows vista business (the client machine odi11)
    connecting to the database oracle11
    have any suggestions for a procedure, something that did not, forgot or did not even know.
    Thank you.

    Hi Ankit Jain
    yes it's the second option,
    exactly the error occurs when I click the icon to select the repository of work - work_dev
    then this exception is generated
    =
    I select for the field
    Drivers List -
    the value >> Oracle JDBC Driver
    and then is placed in the Driver Name field
    value>> oracle.jdbc.OracleDriver
    and after I put a URL
    jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = sss.rrr3.ttttj.ggg.br) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RRR3) ))
    It should say
    that
    This is occurring on a machine, but others the same configuration is working
    I think it's something of the environment on this machine,
    but no longer know what to test
    grateful for your attention.

  • Getting JDBC Connection exception... what is the problem

    I have connection problem and I get the following... Do you have any idea what it might be? Many thanks.
    [java] org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    [java] The last packet successfully received from the server was 82 milliseconds ago. The last packet sent successfully to the server was 82 milliseconds ago.
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
    [java] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
    [java] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698)
    [java] at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:133)
    [java] at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:137)
    [java] at se.kth.ite.mss.KurserUtil.getSenasteValdaKurser(KurserUtil.java:71)
    [java] at org.apache.jsp.minasidor.kurser.nyaKurser_jsp._jspService(nyaKurser_jsp.java:91)
    [java] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    [java] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    [java] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    [java] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    [java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    [java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    [java] at se.kth.ite.portal.ContextLoggingFilter.doFilter(ContextLoggingFilter.java:53)
    [java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    [java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    [java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    [java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    [java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    [java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    [java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    [java] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    [java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    [java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    [java] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    [java] at java.lang.Thread.run(Thread.java:680)
    [java] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    [java] The last packet successfully received from the server was 82 milliseconds ago. The last packet sent successfully to the server was 82 milliseconds ago.
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    [java] at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    [java] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1118)
    [java] at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:107)
    [java] at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4553)
    [java] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1330)
    [java] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2312)
    [java] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
    [java] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
    [java] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    [java] at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
    [java] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
    [java] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:582)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:185)
    [java] at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:205)
    [java] at org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:150)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.testCPDS(InstanceKeyDataSource.java:836)
    [java] at org.apache.commons.dbcp.datasources.SharedPoolDataSource.registerPool(SharedPoolDataSource.java:210)
    [java] at org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:169)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:701)
    [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:676)
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
    [java] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
    [java] ... 29 more
    [java] Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1764)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
    [java] at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:958)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1203)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230)
    [java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1214)
    [java] at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:92)
    [java] ... 53 more
    [java] Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
    [java] at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
    [java] at sun.security.validator.Validator.validate(Validator.java:218)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
    [java] at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
    [java] at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
    [java] ... 61 more
    [java] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [java] at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
    [java] at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
    [java] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
    [java] ... 67 more

    >
    I have connection problem and I get the following... Do you have any idea what it might be?
    >
    It might be that you didn't post any code (using \ tags) for anyone to look at.
    People can't debug code that they can't see.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem With Listener Service: Long Delay Starting Listener, Intermittent Connections

    I am having trouble connecting to my Oracle database.  I'm not sure what the cause was, but now when I connect to a database that has been working fine for the past two years, I usually get a ORA-12541 error.
    I run lsnrctl status on the server and get a prinout like this:
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dqaswn02)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       64-bit Windows Error: 61: Unknown error
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       64-bit Windows Error: 2: No such file or directory
    I've also tried manually stopping the service via services.msc and then restarting via lsnrctl start, but when I do this I get a really long delay (10+ minutes) before it returns with something like:
    TNS-01153: Failed to process string: 0í≈♥
    I'm pretty lost as to what is wrong.  I've been messing around with listener.ora, but I don't see anything problematic in there.  Here's a copy:
    # listener.ora Network Configuration File: E:\app\myc0714\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = E:\app\myc0714\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:E:\app\myc0714\product\11.2.0\dbhome_1\BIN\OraClr11.dll")
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = dqaswn02)(PORT = 1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    # ADR_BASE_LISTENER = E:\app\myc0714
    LOG_FILE_LISTENER = LISTENER
    TRACE_LEVEL_LISTENER = SUPPORT
    TRACE_FILE_LISTENER = LISTENER
    However, a few times during this I've been able to connect to the server, via sqlplus, but it has taken 10 minutes before the connection comes online.  Once I'm connected, I can query my tables as expected, but I need an application to connect.
    If anyone has any ideas on what could be wrong, please let me know.

    When I opened up netca, I didn't have any listeners configured, which seems very strange.  When adding it, I get this message in the cmd window:
    Oracle Net Services Configuration:
    Configuring Listener:LISTENER
    ServiceAliasException: Could not save Service Alias: TNS-04406: Object already e
    xists
    Default local naming configuration complete.
    Listener configuration complete.
    Oracle Net Listener Startup:
        Running Listener Control:
          E:\app\myc0714\product\11.2.0\dbhome_1\bin\lsnrctl start LISTENER
        Listener Control complete.
        Listener start failed.
    I killed the service via services.msc again and tried starting the lsnrctl.  This time I've got a new listening service going:
    Starting tnslsnr: please wait...
    TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
    System parameter file is E:\app\myc0714\product\11.2.0\dbhome_1\network\admin\li
    stener.ora
    Log messages written to e:\app\myc0714\diag\tnslsnr\DQASWN02\listener\alert\log.
    xml
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DQASWN02.petroleumplace.
    com)(PORT=1521)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521
    ipc)))
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DQASWN02.petroleumplace.
    com)(PORT=1521)))
    TNS-01153: Failed to process string: X☺∙♥
    I just tried starting the trace.  I'm waiting for it to connect, I guess.  I'll post anything I get out of it when it returns.

  • "Cannot Get JDBC Connection for external changed actions"

    Hi,
    When I start Planning 9.3 server using tomcat, keep getting this error. I checked the configuration and is okay. Stopped and Started shared services and same result.
    Does anybody has had this message and got around..I have Hyperion System 9 9.3.0.1 installed on a windows 2003 server. Sql Server 2003.
    Any ideas are highly welcomed!!
    Thanks in Advance :)

    Hi Ankit Jain
    yes it's the second option,
    exactly the error occurs when I click the icon to select the repository of work - work_dev
    then this exception is generated
    =
    I select for the field
    Drivers List -
    the value >> Oracle JDBC Driver
    and then is placed in the Driver Name field
    value>> oracle.jdbc.OracleDriver
    and after I put a URL
    jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = sss.rrr3.ttttj.ggg.br) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RRR3) ))
    It should say
    that
    This is occurring on a machine, but others the same configuration is working
    I think it's something of the environment on this machine,
    but no longer know what to test
    grateful for your attention.

  • Get JDBC Connection location

    What is the best way to connect to a database in Java Class?
    I have used 3 different ways and would like to know what is the most efficient one.
    1- Put the connection as a data member:
    public class DatabaseHelperClass {     private Connection connection = new DbConnectionManager().getConnection();         public void insertDb(DbBean db) throws SQLException  {     PreparedStatement stmt = connection.prepareStatement("insert ..");     ...     }   public void updateDb(DbBean db) throws SQLException  {     PreparedStatement stmt = connection.prepareStatement("update ..");     ...     }
    2 - Put connection in Constructor:
    public class DatabaseHelperClass {     public DatabaseHelperClass() {     Connection connection = new DbConnectionManager().getConnection();     }         public void insertDb(DbBean db) throws SQLException  {     PreparedStatement stmt = connection.prepareStatement("insert ..");     ...     }     public void updateDb(DbBean db) throws SQLException  {     PreparedStatement stmt = connection.prepareStatement("update ..");     ...     }
    3- Put connection in every method that needs a connection:
    public class DatabaseHelperClass {     public void insertDb(DbBean db) throws SQLException  {     Connection connection = new DbConnectionManager().getConnection();     PreparedStatement stmt = connection.prepareStatement("insert ..");     ...     } public void updateDb(DbBean db) throws SQLException  {     Connection connection = new DbConnectionManager().getConnection();     PreparedStatement stmt = connection.prepareStatement("update ..");     ...     }

    I normally use connection per thread with a connection pool. And connection is released with every commit and rollback. And never call connection.commit()/rollback/close directly I use a separate database manager class for it.
    public class ConnectionMgr{
    ThreadLocal connecition = new ThreadLocal();
    public static Connection getConnection(){
       Connection c = (Connection)connecition.get();
       if(c == null){
          c = DriverManager.getConnection(....);
          connection.set(c);
       return c;
    public static void commit(){
       Connection c = (Connection)connecition.get();
       if(c != null){
          c.commit();
          close();
    public static void rollback(){
       Connection c = (Connection)connecition.get();
       if(c != null){
          c.rollback();
          close();
    public static void close(){
       Connection c = (Connection)connecition.get();
       if(c != null){
          c.close();
          connection.set(null);
    }Code in a data access method looks like
    public void someMethod(){
      Statement s = ConnectionMgr.getConnection().createStatement();
      s.executeUpdate(".....");
      ConnectionMgr.commit();
    }

  • Problem in getting jdbc connection with oracle for win 98

    This is my code given below
    import java.sql.*;
    public class Oconnection
    Connection conn;
    Statement st;
    PreparedStatement pst,pstissue,pstret,pstbook;
    public Oconnection()
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","manager");
    catch(Exception ex)
    System.out.println(ex.getMessage());
    ex.printStackTrace();
    public static void main(String args[])
    new Oconnection();
    *****************************************************8
    Error
    C:\Library>java Oconnection
    Io exception: The Network Adapter could not establish the connection
    java.sql.SQLException: Io exception: The Network Adapter could not establish the
    connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:266)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at Oconnection.<init>(Oconnection.java:17)
    at Oconnection.main(Oconnection.java:39)
    I am using Oracle for win95 or i think it is oarcleforwin98 .
    The sid of my database i found through query given was orcl, what changes should i do in the code so that it works.
    should i use another driver coz i am using latest driver from oracle.com which is for oracle 8i. if a need a driver change where can i download it from please help me

    http://forum.java.sun.com/thread.jsp?thread=291584&forum=48&message=1305045

  • What causes sometimes long delay in getting thumbnails.

    See attached screen capture.  This tends to happen, the farther back in time I look for old photos.  Entire pages of thumbnails are missing. They only get retrieved when I page down, but sometimes never.  Sometimes I have to click on the blank thumbnail in order to force it to appear.  This makes it difficult to look for old photos.  I just assumed it saved all this information:
    Doing an f5 reftresh has no effect.  My catalog (about 5gb) and previews (30gb) are on a dedicated Crucial 256gb sata-3 SSD which benches very fast, so the drive should not be the cause.  Moreover, the fact that they often never appear should rule out the drive speed.  I don't see a lot of settings to control this sort of thing. What might be causing this failure to display thumbnails?
    Thanks!

    kwdaves wrote:
    An image must be on screen for its thumbnail to be created. Scrolling through your library in Grid view and waiting for the image thumbnails to generate on screen should fix it. It's been that way from the gitgo.
    Thanks for the reply.  Are you saying that the thumbnails only create when they have to, for the first time?  That would explain some of what I'm seeing, but not all. There were some mass imports from pre-LR days (that I've only glanced at) that this would explain.  But on the other hand, there was a 2010 week long event shoot that had lost all its thumbnails and I know I had looked at them all. 
    Anyway, its really not that big of deal because most of them regenerate quickly. It's the ones that don't generate unless I zoom them that made me write this.

  • Error trying to get jdbc connection with Sybase AS

    I'm usin JConnect 5.5 lib jconn2.jar
    -- sample
    Class.forName("com.sybase.jdbc2.jdbc.SybDriver"); -- loading driver
    -- continue with
    conn = DriverManager.getConnection("jdbc:sybase:Tds:malahit:1498/ceh32",user,pwd);
    I've got an error msg "No suitable driver"
    What is a problem?
    What do I do wrong?

    No suitable driver is caused if connection url is not correct. Sybase connection url format is :
    jdbc:sybase:Tds:<host>:<port>/<database>

  • Long delay to get a standard DSL, that too in US??

    I have ordered a DSL of 3MBPS, on Sep 19th and till now, I am not able to get it working. All the time, the problem is in their exchange or MCO or I am not sure where is the problem. Every time I talk to them, the response back time is increasing (1st time, this was 24 hrs, next 48 hrs and today the response expected time is 72 hrs). I am not sure whether the problem will be fixed after this period?
    This is very appaling as a high tech country of USA, to get a DSL / phone working, it takes more than 3 weeks? In the smaller countries like India, China, now the time it took to install a DSL line was 48 hrs from the order date.
    Looks like this kind of the customer service, is one of the reason for the recession.
    Regards

    See the other thread
    http://forums.verizon.com/t5/High-Speed-Internet-DSL-and-Dial/The-end-of-DSL/td-p/237023
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

  • JDBC Connection Error ORA-12514

    Hi all,
    I am trying to connect to an Oracle database on my workstation. I am
    running Red Hat WS 4.x.
    The odbc string I am using is this:
    jdbc:oracle:thin:@//localhost:1521/danoracle
    I am getting the following error:
    Error getting JDBC connection using driver
    'oracle.jdbc.driver.OracleDriver' to database at
    'jdbc:oracle:thin:@//ddschwitrh4.er.xxxx.gov:1521/danoracle' for user
    'satin': java.sql.SQLException: Listener refused the connection with the
    following error:
    ORA-12514, TNS:listener does not currently know of service requested in
    connect descriptor

    It looks like the spam filter does not like the copyright line of the output in both commands.
    [oracle@ddschwitrh4 ~]$ lsnrctl status
    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-FEB-2011 11:21:31
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date 03-FEB-2011 11:00:55
    Uptime 25 days 0 hr. 20 min. 35 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File /home/oracle/app/oracle/diag/tnslsnr/ddschwitrh4/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ddschwitrh4.er.xxxx.gov)(PORT=1521)))
    Services Summary...
    Service "danoraclXDB.er.xxxx.gov" has 1 instance(s).
    Instance "danoracl", status READY, has 1 handler(s) for this service...
    Service "danoracle.er.xxxx.gov" has 1 instance(s).
    Instance "danoracl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [oracle@ddschwitrh4 ~]$ lsnrctl services
    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-FEB-2011 11:22:32
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    Services Summary...
    Service "danoraclXDB.er.xxxx.gov" has 1 instance(s).
    Instance "danoracl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER <machine: ddschwitrh4.er.xxxx.gov, pid: 20456>
    (ADDRESS=(PROTOCOL=tcp)(HOST=ddschwitrh4.er.xxxx.gov)(PORT=11097))
    Service "danoracle.er.xxxx.gov" has 1 instance(s).
    Instance "danoracl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:31020 refused:0 state:ready
    LOCAL SERVER
    The command completed successfully

  • Getting Exception in jdbc connection got from DataSource in Oracle AS

    Hi
    i am using data source in my application.
    When my application is invoked it gets the jdbc connection from the data source, performs set of operations and then releases the connection.
    But if the application is invoked after a long time e.g. 10 hours then i get the following exceptions which i have logged:
    Io exception: Connection reset
    and the other exception is given below:
    Closed Connection
    The data-sources.xml is as follows:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    name="MYDS"
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    location="jdbc/myDSCON"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="xxxxxxxx"
    password="xxxxxxxx"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    inactivity-timeout="30"
    max-connections="100" >
    <property name="cacheScheme" value="1" />
    </data-source>
    </data-sources>
    Please let me know what is wrong with my application or configuration setting or something is wrong with oracle application server.

    Hi,
    I found one solution which is for 10.1.2.x and i am using Oc4j 10.1.3.1 but solution is below
    Solution
    There is a new setting called "ValidateConnections" from 10.1.2.x. This setting will make sure to check the validity of the connections before it is assigned to the application.
    1. Download and apply the patch for unpublished bug 4305639 for your current 10.1.2.x version. If a patch is not already available then please submit a backport request to get the patch to your version.
    2. Set the command line option "-DValidateConnections=true" and restart the container. This can be set via EM AS control or by manually updating opmn.xml file. After the changes the options should look like
    <process-type id="oc4j_test1" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-server -Djava.security.policy=/opt/oracle/jw101202/j2ee/oc4j_test1/config/java2.policy -Djava.awt.headless=true -DValidateConnections=true" />
    <data id="oc4j-options" value="-properties"/>
    Regards,

  • JDBC Blocks again when try to get new connections.

    Hi,
    again, my tomcat freezes today, and i must stop/start tomcat to get new connections:
    i checked MaxDB server and a Running thread causes Timer to block.
    the output of command show t_cnt of the running maxdb thread is:
    --------------------  T270  USER              ( pid =      0 ) ---------------
    remote_node   : 192.168.99.1                          remote_pid    : 0
    dispatcher_cnt: 618065                                command_cnt   : 99418
    exclusive_cnt : 1035660104                            self_susp_cnt : 4
    Resume count 0  total 155        History [ T2 T2 T2 ]
    dev_read_io   : 177                                   dev_read_pg   : 177
    state_vwait   : 0          state_vsleep  : 45         state_vsusp   : 144
    rcv_rpl_count : 99418      rcv_rpl_long  : 0          avg_rcv_rpl_t : 0.0000
    dev_que_len_0 : 177        dev_que_len_1 : 0          dev_que_len>1 : 0
    prio_total    : 2                                     prio_from_oth : 2
    some of the java blocked thread example is:
    "http-80-173" daemon prio=10 tid=0x0000000043edd000 nid=0x7ce8 waiting for monitor entry [0x000000005564c000..0x000000005564da90]
       java.lang.Thread.State: BLOCKED (on object monitor)
            at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:917)
            - waiting to lock <0x00002aaab91895b0> (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
            at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
            at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
            at org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:399)
            at org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:203)
            at org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:644)
            - locked <0x00002aab12f5a5d8> (a org.exolab.castor.jdo.engine.TransactionContextImpl)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:414)
            at com.supridatta.bean.DataPersist.consulta(DataPersist.java:536)
            at com.supridatta.servlet.SupridattaServlet.doConsultarControl(SupridattaServlet.java:730)
            at com.supridatta.servlet.SupridattaServlet$9.resolve(SupridattaServlet.java:294)
            at com.supridatta.servlet.SupridattaServlet.processaOperacao(SupridattaServlet.java:144)
            at com.supridatta.servlet.SupridattaServlet.doAppletControl(SupridattaServlet.java:114)
            at com.supridatta.servlet.SupridattaServlet.service(SupridattaServlet.java:1747)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:183)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    like this exists about 189 java blocked threads all waiting for this one:
    "Timer-4" daemon prio=10 tid=0x0000000043ae7000 nid=0x51b3 runnable [0x0000000042128000..0x0000000042128b10]
       java.lang.Thread.State: RUNNABLE
            at java.net.SocketInputStream.socketRead0(Native Method)
            at java.net.SocketInputStream.read(SocketInputStream.java:129)
            at com.sap.dbtech.rte.comm.BasicSocketComm.receiveData(BasicSocketComm.java:577)
            at com.sap.dbtech.rte.comm.BasicSocketComm.receive(BasicSocketComm.java:666)
            at com.sap.dbtech.rte.comm.JdbcCommunication.execute(JdbcCommunication.java:41)
            at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:536)
            - locked <0x00002aaabce3bc80> (a com.sap.dbtech.jdbc.ConnectionSapDB)
            at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:461)
            at com.sap.dbtech.jdbc.ConnectionSapDB.isClosed(ConnectionSapDB.java:746)
            at com.sap.dbtech.jdbc.trace.Connection.isClosed(Connection.java:400)
            at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.isClosed(DelegatingConnection.java:346)
            at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:324)
            at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
            at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
            - locked <0x00002aaab91895b0> (a org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
            at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
            at java.util.TimerThread.mainLoop(Timer.java:512)
            at java.util.TimerThread.run(Timer.java:462)
       Locked ownable synchronizers:
            - None
    then seeing all this appears that com.sap.dbtech.jdbc.ConnectionSapDB.isClosed(ConnectionSapDB.java:746) do something that blocks all connections, but i cant understand if T270 is related to this Timer-4 java thread.
    any idea?

    Hi Lars,
    I updated all things, Java, Linux, MaxDB, i discovered that the problem isnt with network, but with some kind of deadlock at database side, for example:
    1) user 1 insert something on table A
    2) user 2 starts a long running transaction with poor SQL statement that locks the table A.
    3) user 3 opens a connection to run an SQL statement that queries table A.
    4) all java threads that need a new JDBC connection get blocked because step 3 never returns a new connection, and DBCP synchronization never goes out.
    here is the thread of step 2:
    java.lang.Thread.State: RUNNABLE
            at java.net.SocketInputStream.socketRead0(Native Method)
            at java.net.SocketInputStream.read(SocketInputStream.java:129)
            at com.sap.dbtech.rte.comm.BasicSocketComm.receiveData(BasicSocketComm.java:577)
            at com.sap.dbtech.rte.comm.BasicSocketComm.receive(BasicSocketComm.java:666)
            at com.sap.dbtech.rte.comm.JdbcCommunication.execute(JdbcCommunication.java:41)
            at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:536)
            - locked <0x00002aab1ed9d560> (a com.sap.dbtech.jdbc.ConnectionSapDB)
            at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:461)
            at com.sap.dbtech.jdbc.ConnectionSapDB.doConnect(ConnectionSapDB.java:398)
            at com.sap.dbtech.jdbc.ConnectionSapDB.<init>(ConnectionSapDB.java:109)
            at com.sap.dbtech.jdbc.DriverSapDB.connect(DriverSapDB.java:222)
            - locked <0x00002aaabc74ade0> (a com.sap.dbtech.jdbc.DriverSapDB)
            at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
            at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
            - locked <0x00002aaabc896988> (a org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
            at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
            at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
            at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
            at org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:399)
            at org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:203)
            at org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:644)
            - locked <0x00002aab1e8d9348> (a org.exolab.castor.jdo.engine.TransactionContextImpl)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:414)
            at com.supridatta.bean.DataPersist.consulta(DataPersist.java:536)
    and here is the thread at step 3:
    java.lang.Thread.State: BLOCKED (on object monitor)
            at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
            - waiting to lock <0x00002aaabc896988> (a org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
            at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
            at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
            at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
            at org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:399)
            at org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:203)
            at org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:644)
            - locked <0x00002aab1e898f98> (a org.exolab.castor.jdo.engine.TransactionContextImpl)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
            at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:414)
            at com.supridatta.bean.DataPersist.consulta(DataPersist.java:536)
    I inspected the database side, still really running, database results comes, but without releasing the connection, and if i wait the time or no user need a new connection, i never get thread blockeds, appears that MaxDB locks all connections if the newly created connection executes some SQL after acquiring that connection.
    I see some blocks too at java finalizer, where one thread running is stucked getting a connection.
    all this is just guess, maybe I'm wrong, but for now i will end this thread as we need see how this system will perform with all updates made.
    best regards.
    Clóvis

  • JDBC Connection taking way too long

    Hi,
    I have an odd problem which has just started to happen. I am creating a very simple JDBC connection to the MS SQL Server database using the Microsoft JDBC driver. This has always worked for me in the past and has never caused any problems. Now, however, creating a connection to my database is taking about 20 seconds! This is usually a sub-second operation. I have tried to narrow down the cause, but everything I have tried has failed. Here are all the things I have tried so far:
    1. Using a different JDBC driver (several, including the ODBC bridge)
    2. Create a test app which just has my connection code and run this from different machines on the network under different JDKs
    3. Re-installed by SQL Server database
    4. Connected using IP address rather than machine name (in case it was a DNS issue of some sort)
    5. Connected using different login accounts
    6. Vertified connectivity using telnet (port 1433)
    7. Verified connectivity via ODBC in an ASP page
    If I telnet to the SQL Server service I can connection without any delay. I can also connect immediately using an ODBC connection via an ASP page, so I don't think it's a problem with my database. I just seems that connectivity from Java land of woefully slow. I have never had this problem before, it's only started happening recently. The only thing that has changed recently is that I signed up for a new ADSL provider, but I can't see how this could have any bearing as all the machines are internal and connected by a 100Mbps router!
    Here's the code I am using to test...
    long current = System.currentTimeMillis();
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://<server-ip>:1433;User=<usr>;Password=<pwd>", null);
    System.out.println(System.currentTimeMillis() - current);
    connection.close();This gives me times of about 20 seconds.
    Help!

    You are right.. but the fact that:
    a) I can telnet and connect instantly
    b) The jdbc-odbc bridge connects immediately
    .. tells me that the network is ok.. at least for native functions. The only consistency I can find is that native (windows) functions connect without any issue, but pure Java functions experience problems. It may well be an issue with my network, but it seems that the issue is isolated to the Java environment (guessing here).
    I tested this theory by simply opening a socket connection from Java, but has not problems (connected immediately).
    I tried switching on the debug messages in the DriverManager (DriverManager.setLogWriter(writer))... this didn't tell me anything.
    ... The ONLY thing I can think of trying is disconnecting from my ADSL router and trying a simple cross-over cable from one machine to the other.
    Thanks for your help though.

  • SUN JES 8.1 Q2UR2: Long time taken in getting database connection.

    Application server registered intermittent slowness in getting database connection from javax.sql.DataSource. Based on the following JMX value, the application servers still haven�t reached the threshold. Its identified the slowness was due to application server performing validation (select count(*) from dual).
    Sample code:
    ds.getConnection(username, password); // where DS is the javax.sql.DataSource
    Network
    It is observed that the bi-directional ping stats showed that the response time < 1.19 ms. Network Switch port utilisation was <30% and there were no errors and collision detected.
    Database
    Based on oracle database statspack, it showed that the database is healthy. On top of that, the following query was scheduled to be executed every second to monitor Select count(*) from dual elapsed time.
    select sess.sid, sess.serial#, sess.client_info, sess.program, sql.sql_text, sql.elapsed_time from V$SESSION sess, V$SQL sql where sess.sql_hash_value=sql.hash_value and upper(sql.sql_text) like 'SELECT COUNT(*) FROM DUAL' order by sess.sid
    Basically this query will capture the cumulative elapsed time per session id. This query is able to caption �Select count(*) from dual� that ran more than 2 seconds.
    Example 1 � how the cumulative elapsed time registered in the log:
    2006_11_02_16_53_55,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 10 ms.
    2006_11_02_16_53_55,Connection 2, SID 2 perform a select count(*) from dual. Oracle registered elapsed time 10 ms.
    2006_11_02_16_54_57,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 20 ms.
    2006_11_02_16_54_58,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 30 ms.
    2006_11_02_16_54_58,Connection 2, SID 2 perform a select count(*) from dual. Oracle registered elapsed time 20 ms.
    Example 2 � If query ran more than 2 sec:
    2006_11_02_16_53_55,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 10 ms.
    2006_11_02_16_53_57,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 20 ms.
    2006_11_02_16_54_57,Connection 1, SID 1 perform a select count(*) from dual. Oracle registered elapsed time 2030 ms. << if query that ran more than 2 secs, there will be a sudden jump of 2 secs in the subsequent cumulative elapsed time.
    Previously based on jmx log, it do registered 10k connections was acquired in 1 second and only 6 active connections was used. If same connection was used and on the same second, the cumulative elapsed time will registered in the log. The longest elapsed time that registered in 2 Nov 2006 01:00 pm to 05:00 pm logs was 800 ms but long get database connection still registered 5 to 7 seconds.
    Questions:
    1) Is it possible that I can use dtrace to capture the bottleneck?
    System information:
    Oracle:
    DriverVersion: [10.2.0.1.0]
    DriverMajorVersion: [10]
    DriverMinorVersion: [2]
    DriverName: [Oracle JDBC driver]
    URL: [jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST= (ADDRESS=(PROTOCOL = TCP) (HOST = XXXXXX) (PORT = 1524)) (ADDRESS=(PROTOCOL = TCP) (HOST = XXXXXX) (PORT = 1524))) (CONNECT_DATA = (SID = CP_P)) (source_route=yes))]
    UserName: [CP_P1]
    Database Product Name: [Oracle]
    Database Product Version: [Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production]
    Database Product Major: [9]
    Database Product Minor: [2]
    Drivers: Type 4
    JDK
    JDBC Major: [10]
    JDBC Minor: [2]
    The JDK version is 1.5.0_02
    SUN JES Application Server
    Sun Java System Application Server Enterprise Edition 8.1_02 running under solaris 10

    Massive Crossposting:
    http://forum.java.sun.com/thread.jspa?threadID=790473&messageID=4491822#4491822
    http://forum.java.sun.com/thread.jspa?threadID=790472&messageID=4491819#4491819
    http://forum.java.sun.com/thread.jspa?threadID=790471&messageID=4491817#4491817
    http://forum.java.sun.com/thread.jspa?threadID=790470&messageID=4491816#4491816
    http://forum.java.sun.com/thread.jspa?threadID=790469&messageID=4491815#4491815
    http://forum.java.sun.com/thread.jspa?threadID=790468&messageID=4491814#4491814
    http://forum.java.sun.com/thread.jspa?threadID=790466&messageID=4491812#4491812

Maybe you are looking for