Re: Request timed out SQLException

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Mar 14 2006 - 09:04:39 EST

  • Next message: emre.yilma..r.net: "Żlgi:Re:Request timed out SQLException"

    Try increasing "max connections" setting for the DataNode in the
    Modeler. The default is "1", and from the error message I see that
    you left it unchanged. Try setting it to 2 or higher.

    Andrus

    On Mar 14, 2006, at 4:57 PM, <emre.yilma..r.net>
    <emre.yilma..r.net> wrote:

    > Hi,
    >
    > I get an exception of java.sql.SQLException.I check the MsSql 7.0
    > polling
    > interval which is 10 seconds. But when I use the
    > context.commitChanges() in a
    > TimerTask rarely I get this exception. Is there any way to handle this
    > exception with cayenne or any advice you have?
    >
    > Exception :
    >
    > java.sql.SQLException: Can't obtain connection. Request timed out.
    > Total used
    > connections: 1
    > at org.objectstyle.cayenne.conn.PoolManager.uncheckPooledConnection
    > (PoolManager.java:466)
    > at org.objectstyle.cayenne.conn.PoolManager.getConnection
    > (PoolManager.java:392)
    > at org.objectstyle.cayenne.conn.PoolManager.getConnection
    > (PoolManager.java:385)
    > at org.objectstyle.cayenne.access.DataNode
    > $TransactionDataSource.getConnection
    > (DataNode.java:589)
    > at org.objectstyle.cayenne.access.DataNode.performQueries
    > (DataNode.java:301)
    > at org.objectstyle.cayenne.access.DataDomainCommitAction.commit
    > (DataDomainCommitAction.java:180)
    > at org.objectstyle.cayenne.access.DataDomain.onSync
    > (DataDomain.java:750)
    > at org.objectstyle.cayenne.access.DataContext.doCommitChanges
    > (DataContext.java:
    > 1115)
    > at org.objectstyle.cayenne.access.DataContext.commitChanges
    > (DataContext.java:
    > 1081)
    > at tr.com.htr.hgys.db.AccessPersonelLogs.insertAccessLogs
    > (AccessPersonelLogs.
    > java:27)
    > at tr.com.htr.hgys.core.AccesLogRecorder.validPersonelEntrance
    > (AccesLogRecorder.java:37)
    > at tr.com.htr.hgys.core.AccesLogRecorder.validCardEntrance
    > (AccesLogRecorder.
    > java:24)
    > at tr.com.htr.hgys.core.access.MagneticDoorAccess
    > $DoorCloseReminder.run
    > (MagneticDoorAccess.java:128)
    > at java.util.TimerThread.mainLoop(Unknown Source)
    > at java.util.TimerThread.run(Unknown Source)
    > Exception in thread "Timer-6"
    > org.objectstyle.cayenne.CayenneRuntimeException:
    > [v.1.2M11 February 13 2006] Commit Exception
    > at org.objectstyle.cayenne.access.DataContext.doCommitChanges
    > (DataContext.java:
    > 1125)
    > at org.objectstyle.cayenne.access.DataContext.commitChanges
    > (DataContext.java:
    > 1081)
    > at tr.com.htr.hgys.db.AccessPersonelLogs.insertAccessLogs
    > (AccessPersonelLogs.
    > java:27)
    > at tr.com.htr.hgys.core.AccesLogRecorder.validPersonelEntrance
    > (AccesLogRecorder.java:37)
    > at tr.com.htr.hgys.core.AccesLogRecorder.validCardEntrance
    > (AccesLogRecorder.
    > java:24)
    > at tr.com.htr.hgys.core.access.MagneticDoorAccess
    > $DoorCloseReminder.run
    > (MagneticDoorAccess.java:128)
    > at java.util.TimerThread.mainLoop(Unknown Source)
    > at java.util.TimerThread.run(Unknown Source)
    >
    > My code:
    >
    > class Reminder extends TimerTask {
    > public void run() {
    > AccessPersonelLogs newAccessLogs = (AccessPersonelLogs)
    > context.createAndRegisterNewObject(AccessPersonelLogs.class);
    >
    > newAccessLogs.setTime(ts);
    > newAccessLogs.setDeviceRel(device);
    > newAccessLogs.setPersonelRel(personel);
    > newAccessLogs.setLogTypeRel(type);
    > newAccessLogs.setExcuseResonRel(reason);
    >
    > context.commitChanges();
    > }
    > }
    >
    > Thanks..
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Mar 14 2006 - 09:04:42 EST