RE: BindException

From: Dave Merrin (dmerri..pasystems.co.uk)
Date: Fri Mar 31 2006 - 12:08:22 EST

  • Next message: WONDER: "where to put Cayenne.xml"

    Hi Mike,

    sorry I didn't put it in the first message. I didn't have a copy of it when
    I send the first message, hence the need to try and reproduce it.

    It's just happened again on a client site:

    java.net.SocketException: java.net.BindException: Address already in use:
    connect
            at
    com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
            at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
            at com.mysql.jdbc.Connection.<init>(Connection.java:1474)
            at
    com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
            at
    org.objectstyle.cayenne.conn.DriverDataSource.getConnection(DriverDataSource
    .java:151)
            at
    org.objectstyle.cayenne.conn.DriverDataSource.getConnection(DriverDataSource
    .java:123)
            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.DataDomainQueryAction.runQuery(DataDomainQuer
    yAction.java:298)
            at
    org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataDomainQuery
    Action.java:138)
            at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:724)
            at org.objectstyle.cayenne.access.Transaction.onQuery(Transaction.java:206)
            at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:721)
            at
    org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContext
    QueryAction.java:244)
            at
    org.objectstyle.cayenne.access.DataContextQueryAction.execute(DataContextQue
    ryAction.java:88)
            at
    org.objectstyle.cayenne.access.DataContext.onQuery(DataContext.java:1261)
            at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:125
    0)
            at
    ipa.printexpress.data.helpers.Session.fetchEntityCollection(Session.java:70)
            at ipa.px.data.adapter.PxDataAdapter.fetch(PxDataAdapter.java:124)
            at
    ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:71)
            at
    ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:56)
            at
    ipa.px.data.adapter.ItemNodeAdapter.getItemByItemId(ItemNodeAdapter.java:634
    )
            at
    ipa.px.data.provider.PxItemNodeProvider.getItemsByItemId(PxItemNodeProvider.
    java:262)
            at
    ipa.px.tracker.logimporter.actions.AbstractAction.saveItem(AbstractAction.ja
    va:311)
            at
    ipa.px.tracker.logimporter.actions.AbstractAction.defaultCreateItemAction(Ab
    stractAction.java:139)
            at
    ipa.px.tracker.logimporter.actions.LogSeparationAction.doAction(LogSeparatio
    nAction.java:35)
            at
    ipa.px.tracker.logimporter.msgrouter.MessageRouter.run(MessageRouter.java:13
    7)
            at
    ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runIt(ThreadPoolWorke
    r.java:121)
            at
    ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runWork(ThreadPoolWor
    ker.java:103)
            at
    ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.access$000(ThreadPool
    Worker.java:21)
            at
    ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker$1.run(ThreadPoolWorke
    r.java:62)
            at java.lang.Thread.run(Unknown Source)

    > -----Original Message-----
    > From: Mike Kienenberger [mailto:mkienen..mail.com]
    > Sent: 31 March 2006 17:39
    > To: cayenne-use..ncubator.apache.org
    > Subject: Re: BindException
    >
    >
    > What's the stack trace look like?
    >
    > On 3/31/06, Dave Merrin <dmerri..pasystems.co.uk> wrote:
    > > Hi,
    > >
    > > I get a bind exception when I'm doing large numbers of queries
    > very quickly.
    > > I did some optimization which eliminated the exceptions on my
    > machine but
    > > now I'm getting them on a different machine which is heavily loaded.
    > >
    > > I'm using MySql5 and Cayenne M11.
    > >
    > > Are there any connections I should be closing between calls?
    > All queries are
    > > done from the same DataContext and on the same thread (only one
    > thread for
    > > this DataContext).
    > >
    > > I'll try and produce some code to reproduce the problem. In the
    > meantime can
    > > anybody help?
    > >
    > > Dave
    > >
    > >
    >



    This archive was generated by hypermail 2.0.0 : Fri Mar 31 2006 - 12:09:08 EST