Hi Todd,
Could it be that there are different versions of the Collection Library in
your classpath? I had some problems like this in my Struts webapp and
upgrading to collections 1.3
(http://jakarta.apache.org/commons/collections/) seemed to solve my
problems.
Regards, laszlo
>From: Todd O'Bryan <toddobrya..ac.com>
>Reply-To: cayenne-use..bjectstyle.org
>To: cayenne-use..bjectstyle.org
>Subject: Heretofore unseen error
>Date: Sun, 6 Mar 2005 07:43:33 -0500
>
>I'm trying to run a unit test that worked a while ago and doesn't seem to
>now. (Of course, if I'd been running it regularly, I could tell you what I
>did that broke it, but let's just pretend that I just wrote it...)
>
>In the JUnit output, I see:
>
>java.lang.NoSuchMethodError:
>org.apache.commons.collections.IteratorUtils.singletonIterator(Ljava/
>lang/Object;)Lorg/apache/commons/collections/ResettableIterator;
> at
>org.objectstyle.cayenne.map.ObjAttribute.getDbPathIterator(ObjAttribute.
>java:185)
> at
>org.objectstyle.cayenne.access.trans.SelectTranslator.appendAttributes(S
>electTranslator.java:361)
> at
>org.objectstyle.cayenne.access.trans.SelectTranslator.buildColumnList(Se
>lectTranslator.java:311)
> at
>org.objectstyle.cayenne.access.trans.SelectTranslator.createSqlString(Se
>lectTranslator.java:134)
> at
>org.objectstyle.cayenne.access.trans.QueryAssembler.createStatement(Quer
>yAssembler.java:131)
> at org.objectstyle.cayenne.access.DataNode.runSelect(DataNode.java:385)
> at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:
>350)
> at
>org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java
>:654)
> at
>org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
>va:1408)
> at
>org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.ja
>va:179)
> at
>org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.ja
>va:1366)
> at
>org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
>:1622)
> at
>org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
>:1485)
> etc.
>
>But the log has:
>
>INFO main org.objectstyle.cayenne.access.QueryLogger - Created connection
>pool: jdbc:mysql://localhost/test
> Driver class: com.mysql.jdbc.Driver
> Min. connections in the pool: 1
> Max. connections in the pool: 1
>INFO main org.objectstyle.cayenne.access.QueryLogger - --- will run 1
>query.
>INFO main org.objectstyle.cayenne.access.QueryLogger - Opening connection:
>jdbc:mysql://localhost/test
> Login: test
> Password: *******
>INFO main org.objectstyle.cayenne.access.QueryLogger - +++ Connecting:
>SUCCESS.
>INFO main org.objectstyle.cayenne.access.QueryLogger - --- transaction
>started.
>INFO main org.objectstyle.cayenne.access.QueryLogger - --- will run 1
>query.
>INFO main org.objectstyle.cayenne.access.QueryLogger - *** error.
>java.sql.SQLException: Can't obtain connection. Request timed out. Total
>used connections: 1
> at
>org.objectstyle.cayenne.conn.PoolManager.uncheckPooledConnection(PoolMan
>ager.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.performQueries(DataNode.java: 313)
> etc.
>
>Any idea what might be going wrong?
>
>I can tell you that the database connection actually works, because I have
>the test version of my webapp using the same database and it seems to work
>okay.
>
>Thanks,
>Todd
>
_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl
This archive was generated by hypermail 2.0.0 : Sun Mar 06 2005 - 09:16:29 EST