JDBC Timeout

Hi,
We are using a JDBC connection to Oracle for some reports we migrated from 3.1 to 4.0.  All reports under about 20 minutes work fine, but when you hit the 20 minute mark, the report errors out.  We had a similar issue in 3.1 that we fixed by adding a -RequestTimeout X (where X is milliseconds - 3600000 in our case) in the Crystal Job Server command line switch.  (in addition to changing the timeout in CRConfig.xml)  The Crystal Job Server doesn't seem to exist in 4.0, and adding it to the Adaptive Job Server command line doesn't work (the AJS ends up in failure status).  Anyone know how to get similar behaviour to the -RequestTimeout in version 3.1?

Hi Jin-Chong,
We have that value set to 10800 which I believe is 3 hours.  We also set the timeout up top from 10 to 180, and upped the JVM Heap sizes.
<?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
    <timeout>180</timeout>
<IORFileLocation>${TEMP}</IORFileLocation>
<JavaServerTimeout>10800</JavaServerTimeout>
<JavaServerStartupTimeout>30</JavaServerStartupTimeout>
<JVMMaxHeap>512000000</JVMMaxHeap>
<JVMMinHeap>64000000</JVMMinHeap>
No luck with that though.  Still waiting from a response from SAP also, I think they will call me today.
I did some searching,  and I don't know if its related, but there is a timeout in the following file (on linux)
.../webapps/BOE/WEB-INF/eclipse/plugins/webpath.CrystalReports/web/WEB-INF/web.xml
    <!-- Define the default session timeout for your application,
        in minutes.  From a servlet or JSP page, you can modify
        the timeout for a particular session dynamically by using
        HttpSession.getMaxInactiveInterval().
    -->
    <session-config>
      <session-timeout>20</session-timeout>    <!-- 20 minutes for session objects -->
    </session-config>
Regards,
Sabir

Similar Messages

  • Synchronous JDBC Timeout

    Hi Experts, I have a synchronous proxy-jdbc with SQL_QUERY (Select) as action. When the query is executed directly in the DB, it's only taking 3-4 minutes to get the results. But when it's run thru PI, we always encounter synchronous timeout exceeded error (20 minutes). Since the query is getting results on time in the DB, I'm thinking the problem could be in PI side but I'm running out of options to check. Has anyone faced this problem before? Any inputs will be greatly appreciated. Thanks!

    Hi Mark,
    It looks like a network problem. Can you ping the database hostname in your PI system (create ping command in SM69)? Also take a look at this note: Note 1085539 - XI JDBC/FTP connection Test and XML Validation Application
    Hope this helps,
    Mark

  • PostgreSQL JDBC Timeout

    Hello... how can i set a timeout to my PostgreSQL jdbc connections? My application cant wait the large solaris default tcp timeout....
    thanks...

    I tryed to use the loginTimeout propertie and it appear work fine, but when the timeout occurs he keeps locked a thread called "PostgreSQL JDBC driver connection thread" that confuses my thread counter based on ThreadGroup.... i think that this loginTimeout does not use the setSOTimeout....

  • ODI Proc to loop / call scenario launches twice - jdbc timeout?

    Fellow Gurus,
    Bit of a funny one - I have an ODI Proc looping around a set of variables (source and target table names) to dynamically call an interface to builk shift a set of data. The Sync Mode = 1 as I want to run it in Serial so I dont get a clash of C$ / I$ tables , however I have a weird behaviour where in some cases, a duplicate session is launced (when the sub-scenario runs for longer than 5 mins) - with the same variable values as the last session (there are no dupes in my command on source).
    Is there a timeout setting for how long the Parent session waits before launching again ?
    I dont want to go down the route of using WaitForChildsession if I can help it as it complicates the chain somewhat - Any other workarounds ?
    Basic set up is :
    Proc (Command on source, StartScen command on target)
    --- Calls package (declare Variable, Run Interface)
    Loop.
    Thanks
    Alastair

    I experienced the same behaviour in one of my scenarios recently - multiple sessions spawning for the same scenario without any apparent reason. It was caused by a timeout on the agent host server and increasing the timeout value resolved it in my case.
    My setup was 2 agent Linux servers (JavaEE), load balanced.
    Edited by: _Phil on Jan 16, 2013 3:44 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Set Timeout in TopLink JPA

    Hi
    I am using a standalone JPA application with Toplink
    I need to implement a timeout feature
    But I do not find any options for setting the timeout in any of
    javax.persistence.EntityManager;
    javax.persistence.Query etc
    nor do i find any property that I can add in the persistence.xml
    My persistence.xml is as below
    <persistence-unit name="CHN" transaction-type="RESOURCE_LOCAL">
    <provider>
         oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    </provider>
    <class>com.TestJPA</class>          
    <properties>
         <property name="toplink.jdbc.driver"
    value="oracle.jdbc.driver.OracleDriver" />
         <property name="toplink.jdbc.url"
         value="jdbc:oracle:thin:@localhost:1521:XE" />
         <property name="toplink.jdbc.user" value="JEN" />
         <property name="toplink.jdbc.password" value="JEN" />
    </properties>
    </persistence-unit>
    Thanks
    lad

    Unfortunately, the eclipselink.jdbc.timeout hint is only in EclipseLink. If you are using TopLink Essentials, the only query hints available are in the oracle.toplink.essentials.config.TopLinkQueryHints class and does not include the jdbc timeout. If you cannot upgrade/migrate to EclipseLink, you can set it directly using the DatabaseQuery.setQueryTimeout() method. You will need to cast the EJBQuery and get the underlying TLE query:
    ((oracle.toplink.essentials.ejb.cmp3.EJBQuery)jpaQuery).getDatabaseQuery().setQueryTimeout(yourIntValue);
    jpaQuery.getResultList();
    Best Regards,
    Chris

  • JPA error with nested exception for more details

    Hi All,
    A strange thing is that when i can deploy javaee app successfully. But some time, it is failed and i have to wait for 10, 15 minutes then i can deploy again. When i got error, below is the error message:
    I don't know if you can find a hint.
    INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
    SEVERE: Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
    SEVERE: Exception while preparing the app
    SEVERE: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    javax.persistence.PersistenceException: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    ... 40 more
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 more
    SEVERE: Exception while preparing the app : Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
    Local Exception Stack:
    Exception [EclipseLink-4019] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Error while obtaining information about the database. Refer to the nested exception for more details.
                    at org.eclipse.persistence.exceptions.DatabaseException.errorRetrieveDbMetadataThroughJDBCConnection(DatabaseException.java:361)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:602)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                    at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                    at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                    at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
                    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
                    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
                    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
                    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLRecoverableException: Closed Connection
                    at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:4508)
                    at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:345)
                    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:589)
                    ... 42 morethanks,
    -Hoang Long

    r035198x wrote:
    Yep, the appserver got hold of a usable connection but the connection was closed before the appserver had finished/committed with it. It could be that the connection was closed by the database or some firewall timeout setting.
    A good start is to investigate options of configuring your appserver's connection eviction policies including forcing a validation SQL to be executed when a connection is acquired. Make sure that such a query doesn't impact on performance and have some performance and integration testing before rolling out.i found that if i close the computer which causes this issue, hence other dev computers can deploy normally.
    "deploy" here i mean deploy to a running instance on each dev's machine.
    From this, i would guess the common database server itself rejects connection from clients.
    I will try to investigate more if i am missing something.
    And here i found a link that possibly a first good attempt:
    [http://www.eclipse.org/forums/index.php/m/505809/]
    EclipseLink automatically recovers from communication failures, but there is little we can do to diagnose the failure. We basically execute a query and have to wait for the JDBC driver, or DataSource's response, if it hangs for 10minutes, then we are waiting. You could set the JDBC timeout hint on your query, but whether the JDBC driver honors this is up to the driver. You should see the SQLException in your logs, provided your log level is warning or lower.
    If you cannot fix your firewall, they you could change your connection pool settings to use a min number of connections of 0, so there will never be idle connections. But then you will be reconnecting a lot.
    You could also use a third party connection pool or DataSource that supports a timeout setting on the pooled connections, or spawn a thread in your application the clears the connection pool every 30minutes.regards,
    -HL

  • Microsoft SQL Server JDBC Drivers 4.0.2206 timeout on first connection to SQL Server Express after it sleeps

    Our builds kick off and run integration tests. They are configured to hit a SQL Server Express server.
    If the builds have been quiet for a while, the first test to connect fails after stalling for 20 minutes.
    Subsequent tests are fine.
    Reversing test order does the same thing, with a different test.
    We noticed in the SQL Server express log the server saying it is waking up after being idle.
    Microsoft SQL Server Express with Microsoft SQL Server JDBC Drivers 4.0.2206.
    Connection times out after 20 minutes.Occurs with the first connection made after the SQL Server Express server wakes up from going to sleep.Connections after the first are just fine, until SQL Server Express sleeps.SSL enabled. Timeout duration for the connection failure is unaffected by setting timeout options for the connection.  Work around:
    cron-like job that runs every minute that makes a simple query on the server keeps the server from going to sleep.
    Has anyone else run into this?

    Hello,
    SQL Server Express will go to sleep if idle, this behavior is not configurable.
    When SQL Express transitions from idle to active some of the memory that was released needs to be reclaimed; this results is a slight lag during "startup time" when you're first connecting to SQL Express.
    The other sort of sleep occurs when a database with AUTO_CLOSE unloading itself after a period of inactivity. This can be resolved by setting AUTO_CLOSE to false.
    You can refer to the following blog about more details about this:
    http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx
    You can try to upgrade the SQL Server Express to a non-free version to get rid of this.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Jdbc driver creates new thread for each statement with a query timeout set

    I am profiling a web application that is using the Microsoft JDBC driver, version 1.1 to connect to a sql server 2005 database. Each java.sql.Statement that is created, within the application, gets a query timeout value set on it ( statement.setQueryTimeout(...) ).
    I have discovered that the JDBC driver creates a new thread to monitor each Statement and the query timeout value. When the application is under load these threads are getting created faster then they are being destroyed and I am concerned that this will cause a performance problem in production.
    One option I have is to remove the query timeout value and the monitor threads will not be created, another is to change JDBC drivers.
    I'm curious is there any way to control this behavior so that these threads are not created or are managed more efficiently.  Is there a workaround that anyone is aware of?   Is this considered a bug?
    I have found a similar bug here for the 2000 driver:
    http://support.microsoft.com/default.aspx/kb/894552
    Cheers

    Hi,
    Thank you for using the Microsoft SQL Server JDBC driver.  You are correct that a new thread is started to monitor the query timeout when a statement is executed.  This is a potential performance issue that we may look at addressing in the upcoming v1.2 release.  The current behavior is not configurable.  The only workaround with the v1.1 driver is to limit your use of query timeouts to only those statements which you reasonably might expect to actually time out.
    We do take customer feedback very seriously, so if anyone else is concerned about this particular issue, please chime in and we will be able to give it appropriate weight.
    --David Olix [MSFT]

  • JDBC & setQueryTimeout - or is there another way to set query timeout?

    I am trying to set query timeout for TimesTen using jdbc library. But it seems like TimesTen jdbc library does not support setQueryTimeOut. Is there a way to set it without having to set it statically in the DNS?
    I tried to set the SqlQueryTimeout in the connection string but it doesn't work either:
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=bleh;TCP_PORT=17013;TTC_Server_DSN=blah;TTC_Timeout=0;SqlQueryTimeout=5;");
    Thanks for your help!

    Thanks for replying. I don't know have good knowledge on Cache Connect. I will have to read on that first.
    It seems like TimesTen does not support jdbc setQueryTimeout. Calling this method on TimesTen jdbc library will return false: supportsQueryTimeout().
    I created a test class for testing the SqlQueryTimeout. I set the TTC_Timeout to 400 seconds and SqlQueryTimeOut to 5 seconds. So after 5 seconds it should time out.
    The way I test it is by putting a break point before executing the query, do a route add DBServer to an un-connectible gateway to simulate the network delay/connection problem and then continue after I added the route.
    After executing the query, instead of timing out after 5 second, it will wait for a few minutes before timing out.
    The code for testing the timeout is as follow:
    public class TTTest {
         public static void main(String[] args) throws ClassNotFoundException {
         Class.forName("com.timesten.jdbc.TimesTenDriver");
         try {
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=server;TCP_PORT=17013;TTC_Server_DSN=server_dns;"
         + "TTC_Timeout=400;SqlQueryTimeout=5;");
         System.out.println(connection.getClass().getName());          
         Statement stmt = connection.createStatement();
         //com.timesten.jdbc.JdbcOdbcStatement stmt = (JdbcOdbcStatement)connection.createStatement();     
         System.out.println(stmt.getClass().getName());
         System.out.println("Query started " + new Date());
    // Pause here, put a route add and continue
         ResultSet rs = stmt.executeQuery("select count(*) from mse");
         rs.next();
         System.out.println("there are " + rs.getInt(1) + " rows");
         rs.close();
         stmt.close();
         connection.close();          
         } catch (Exception x) {           
         x.printStackTrace(System.err);
         System.err.println(new Date());
    }

  • JDBC Wait timeout in WL 7.0

    Hi All,
    We are using the JDBC connection pool in the application and I have
    coinfigured the max connections as 100. Its been observed that, when
    the 101st user request for the connection, pool throws
    ResourceException immediately without waiting any time. Is it possible
    to coinfigure pool in WL 7.0 with wait timeout? if possible how?
    Thank you all,
    Santhosh.

    Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]..
    Currently there is no way to make the pool waiting. But you can
    easily fix the problem by increasing size of the connection
    pool.So if he increases to 200, and his 201st user logs in and gets the same
    problem?Aparently, if you can not set up a pool to satisfy all requests,
    there is a problem with code/design. We can hardly fight
    programming/design mistakes except may be giving good
    advices.
    The fundamental problem is that the design of his application is retaining
    a pooled JDBC connection indefinitely, spanning multiple interactionsbetween
    a given user and the server. If this is necessary the customer must either
    have a pool with as many connections as he will have concurrent users,I meant exactly that.
    or he should write his application to use direct non-pooled connectionswhich
    he gets from the DBMS driver.Than application will get screwed up using direct driver calls.
    As for me, it doesn' t make big difference. At least using
    pool helped to identify the fact of the problem presence
    quickly.
    < Ideally, the customer can design the application
    like EJBs or good servlets, that get a connection, use it, and return itto the pool,
    all with a single user-server message/response.Sure.
    Regards,
    Slava Imeshev

  • Synchronous JDBC - message timeout

    Hi,
    I have a scenario RFC-XI-JDBC synch. I am getting a message timeout error while trying to post large data volume. Apparently the sync message is geting expired after timeout (default 180 sec).
    I found SAP note 730870 (question 14) suggests to increase the property xiadapter.inbound.timeout.default. However, SAP note 791379 says you should never change this value.
    Is anyone has chaged this value in oreder to optimize performance ? Pls suggest.
    Also pls let me know if you have any other suggestion.

    As per the documentation
    http://help.sap.com/saphelp_nw04s/helpdata/en/29/22ee41c334c717e10000000a155106/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bd5950ff-0701-0010-a5bc-86d45fd52283
    You should increase the timeout from 180000(default) to 240000.
    or 240 sec.
    please visit
    Re: MessageExpired because of large amount of data

  • XI adapter polling issue & JDBC  / DB2 driver connection timeout properties

    Hello Group,
    We have a long running issue with our XI 7.0 system running on iseries. (V5R3) The issue occuring is that our XI adapters stop polling and the only resolution is to restart the J2EE engine or to resart the adapter framework services.
    We have had several OSS messages open on this subject for over a year and are going round in circles with the a number of different SAP consultants.
    The one topic that we keep coming back to is that we are being asked to set DB2 driver connection timeout properties. We are using the toolbox driver and have upated to the latest JTopen driver, but have not managed to find any inofrmation on how to set the timeout parameter. Does anyone know where the timeout parameter set?
    Has anyone experienced polling issue like this before and how did you resolve?
    SAP referred to the SAP note 1078420 - XI/PI JDBC Adapter: Setting JDBC driver properties for DB which is for Oracle, but this will give an idea of what timeout parameters SAP are asking about.
    Extract of the note is below:-
    Symptom
    This note gives an option to set JDBC driver properties while acquiring a DB connection. When connecting to DB using JDBC adapter there are instances
    where DB connection take a long time to establish connection. Some times call made to Driver will hang permanently. Setting driver properties would resolve this problem.
    More Terms
    Connection timeout, time out, query timeout
    Cause and Prerequisites
    Solution
    In the advanced mode table section of sender channel and receiver channel configurations, we can set driver properties for each DB connection. Any
    such property would have to contain prefix 'driver:'(with out quotes) For example, for Oracle Database JDBC thin driver 10.2.0.3 version, the
    property oracle.jdbc.ReadTimeout helps to set read timeout while reading from the socket. Also for setting login time out in Oracle, we use
    oracle.net.CONNECT_TIMEOUT. To set these two properties use as follows:
    driver:oracle.jdbc.ReadTimeout 1000
    driver:oracle.net.CONNECT_TIMEOUT 1000
    (The TimeOut Driver properties like ReadTimeout and CONNECT_TIMEOUT are in milliseconds)
    Refer to your DB documentation/ JDBC driver documentation on this. Please note that properties can vary from each driver version. For instance, some
    of properties of Oracle JDBC thin Driver 10.2.0.3 properties may not be present in older version drivers. Please contact DB vendor for the complete
    list of driver properties. In addition to above, we also provide another parameter for query time out.
    sqlquerytimeout (prefix 'driver:' is not required) is the parameter that is to be used for SQL query time out. This is case-sensitive and should be
    configured as positive integer value in seconds(greater than 0).
    Any help on this would be much appreciated.
    With regards,
    Steven

    Hello,
    I am not talking about the XI timeouts. But the timeouts which can be used to get the connection timeouts for DB2/AS400 databases.
    So please provide that information.
    THanks,
    soorya

  • OAS 10.1 3.1 0 OC4J JDBC Connection/Timeout settings

    I am fairly new to OAS, and am trying to resolve a intermitent issue,
    I have an OAS 10.1.3.1.0 with a deployed EAR file I was provided by a supplier containing mainly PL/SQL based logic, which configured the OAS to ask a middle tier for a an external to pass data to it via Stored Procedure and then usiing the deployed package connect to an external Oracle DB and insert the data.
    Oas is running on a Windows 2003 platform that has no problems or connectivity problems, how ever intermittenlt the OAS stops uploading data to the external Oracle DB. Some custom external logging details this as a communication at the time it occurs, how ever there are no comms issues. A quick restart of the OAS windows service resolves the issue.
    Apart from upgrading OAS to patch set 5, the only other thing I considered could be causing the issue is how OAS is handling the session timeout or connection pool.
    I can see the following settings for the JDBC connection I am using, I wondered if anyone could advise anything that could be changed? I am not sure the implications on setting the validate connection to True and also not sure why maximum number of connections is set to -1?
    Connections
    Initial size of Connection Cache
    Minimum Number of Connections
    Maximum Number of Connections
    Connection Retry Interval (seconds)
    Maximum Connection Attempts
    Maximum Number of Statements Cached
    Lower Threshold Limit On Pool (%)
    Defaults to 20% of max connections.
    Validate Connection FalseTrue
    Timeouts
    Inactivity Timeout (seconds)
    Time that an unused connection is inactive before it is removed from the pool.
    Wait For Used Connection Timeout (seconds)
    Maximum time to wait for a used connection to be released.
    Max Active Time for a Used Connection (seconds)
    Maximum time a used connection may be active.
    Abandoned Connection Timeout (seconds)
    Enforce Timeout Limits Interval (seconds)
    Any help would be appreciated

    Hi,
    Along with Priya's suggestions, please refer the link below for the details on the parameters.
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/datasrc.htm#CHDCFCHB
    Hope this will help understand all the parameters.
    Also refer,
    What Should Be My Maximum Connection Pool Size? [ID 1061155.1]
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html
    Regards,
    Mithun

  • [Macromedia][Oracle JDBC Driver]Execution timeout expired

    From time to time, I get "[Macromedia][Oracle JDBC Driver]Execution timeout expired" errors in my log files on queries that should normally take < 10 ms. If this happens too often (the exact count seems to be different every time), ColdFusion stops responding (and logging!).
    Between CF and the Oracle DB server I have a firewall.
    The firewall seems to be ok, Oracle stops receiving db requests without further errors and CF stops without writing anything in the log files.
    What now? I'm using the latest CF9, fully patched and updated. We use a reboot script for the time beeing, but we'd like to know what is going on.

    Is there any way you can bypass the firewall on a networking level to rule it out?

  • Timestem and jdbc Query Timeout

    hi all,
    i have install timesten on one computer and configure there Query Timeout like This:
    SQLQueryTimeout = 80
    and i have JBoss Application Server on another computer and timesten client.
    i've timesten-xa-ds.xml configuration file configured like this :
    <set-tx-query-timeout>
    <query-timeout>50000</query-timeout>
    <set-tx-query-timeout>
    and when i tryed to execute sql command i get an error:
    14:19:13,342 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: S1000
    14:19:13,344 ERROR [JDBCExceptionReporter] [TimesTen][TimesTen 6.0.4 CLIENT]Query Timeout must be numeric, greater than or equal to 0, and less than the Network Timeout
    14:19:13,346 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
    14:19:13,346 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
    14:19:13,346 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:56)
    14:19:13,347 ERROR [STDERR] at com.magti.businesslayer.ejb3Fasade.srvprov.MobileServiceFasadeBean.simChange(MobileServiceFasadeBean.java:1381)
    can anybody help me ? :(

    We are execute some tests and we got this mistake
    java.sql.SQLException: [TimesTen][TimesTen 7.0.1.0.0 CLIENT]Query Timeout must be numeric; if the Network Timeout is non-zero, the Query Timeout must be greater than zero and less than the Network Timeout, else if the Network Timeout is zero, the Query Timeout must be greater than or equal to zero.
    at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3186)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3320)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:3285)
    at com.timesten.jdbc.JdbcOdbc.SQLSetStmtOption(JdbcOdbc.java:2555)
    at com.timesten.jdbc.JdbcOdbcStatement.setStmtOption(JdbcOdbcStatement.java:1889)
    at com.timesten.jdbc.JdbcOdbcStatement.setQueryTimeout (JdbcOdbcStatement.java:714)
    at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:226)
    at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:162)
    at org.hibernate.loader.Loader.doQuery(Loader.java:714)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.loadCollection(Loader.java:1919)
    at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)
    at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
    at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
    at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
    at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
    at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java :827)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:229)
    at org.hibernate.loader.Loader.doList(Loader.java:2150)
    at org.hibernate.loader.Loader.listIgnoreQueryCache (Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java :300)
    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    at org.springframework.orm.hibernate3.HibernateTemplate$31.doInHibernate(HibernateTemplate.java:853)
    at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
    at org.springframework.orm.hibernate3.HibernateTemplate.find (HibernateTemplate.java:844)
    at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:836)
    at com.bursatec.bmv.selectividad.persistence.dao.impl.FedCenlacesDaoImpl.findEnlaces(FedCenlacesDaoImpl.java :119)
    at com.bursatec.bmv.retransmision.middleware.service.impl.RetransmisorImpl.getEnlaces(RetransmisorImpl.java:229)
    at com.bursatec.bmv.retransmision.middleware.service.impl.RetransmisorImpl.getInfoEnlace (RetransmisorImpl.java:242)
    at com.bursatec.bmv.retransmision.middleware.service.impl.RetransmisorImpl.efectuarReTx(RetransmisorImpl.java:122)
    at com.bursatec.bmv.retransmision.middleware.service.impl.RetransmisorImpl.atenderSolicitud (RetransmisorImpl.java:103)
    at com.bursatec.bmv.retransmision.middleware.configura.SubscriptorListener.onMessage(SubscriptorListener.java:22)
    at progress.message.jimpl.Session.deliver(Unknown Source)
    at progress.message.jimpl.Session.run(Unknown Source)
    at progress.message.jimpl.Session$SessionThread.run(Unknown Source)
    I wish some one could help me
    Thanks a lot.

Maybe you are looking for

  • A better way to run .FMX from hyperlink

    Dear all, I am finding ways to execute .FMX from hyperlink in HTML. I tried to create a shortcut file (.LNK) that runs the .FMX and then using a hyperlink to refer that shortcut file. However, the browser prompts me for whether to run or to save the

  • Time Capsule Impacting email????

    I am having this problem with my iMac, an old iBook, and a MacBook Pro...started a few weeks ago. I have three different email accounts in the house (2 comcast and .me). The iMac and the iBook use Entourage and the MacBook uses MAIL. We had no proble

  • Recovering VI

    I am developing an application on a PC, and while I was away one day, someone needed to move the PC.  When they did that, I was in the midst of development, so some VIs were not saved.  After I got the PC back, I noticed that I lost a lot of work on

  • Mac won't restart after updating to OS X Mountain Lion

    Mac won't restart after updating to OS X Mountain Lion. Please help?

  • My raisins are confusing me

    I just opened a box of raisins, and on the inside lid it has the following quote "Happiness is an inside job." What does that mean, and what does that have to do with raisins?