MMBase

MultiPool.getFree can fail.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.5.1
  • Fix Version/s: Irrelevant
  • Component/s: Database Layer
  • Description:
    Hide
    original bugid: #3156
    2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas
    e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
            at java.util.Vector.elementAt(Vector.java:412)
            at org.mmbase.module.database.MultiPool.getFree(Unknown Source)
            at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)
            at org.mmbase.module.database.JDBC.getConnection(Unknown Source)
            at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source)

    Should perhaps be solved by a decent producer/consument model:
    http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html

    --> this is bug 2669
    Ok, perhaps the changes of Marcel also fixed it, but I cleaned the code, using 'DijkstraSemaphore' anyway.
    I think the code is easier to understand now.
    Perhaps good to test it out.

    Another option is leaving the connection-providing to the app-server.
    Show
    original bugid: #3156 2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0         at java.util.Vector.elementAt(Vector.java:412)         at org.mmbase.module.database.MultiPool.getFree(Unknown Source)         at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)         at org.mmbase.module.database.JDBC.getConnection(Unknown Source)         at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source) Should perhaps be solved by a decent producer/consument model: http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html --> this is bug 2669 Ok, perhaps the changes of Marcel also fixed it, but I cleaned the code, using 'DijkstraSemaphore' anyway. I think the code is easier to understand now. Perhaps good to test it out. Another option is leaving the connection-providing to the app-server.

Activity

Hide
Michiel Meeuwissen added a comment - 1970-01-01 00:59
this is bug 2669 So perhaps it is fixed already. Though we have some doubts still abou the fix...
Show
Michiel Meeuwissen added a comment - 1970-01-01 00:59 this is bug 2669 So perhaps it is fixed already. Though we have some doubts still abou the fix...
Hide
Michiel Meeuwissen added a comment - 2002-10-10 15:23
MultiPool.getFree can fail.
2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas
e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
        at java.util.Vector.elementAt(Vector.java:412)
        at org.mmbase.module.database.MultiPool.getFree(Unknown Source)
        at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)
        at org.mmbase.module.database.JDBC.getConnection(Unknown Source)
        at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source)

Should perhaps be solved by a decent producer/consument model:
http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html
Show
Michiel Meeuwissen added a comment - 2002-10-10 15:23 MultiPool.getFree can fail. 2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0         at java.util.Vector.elementAt(Vector.java:412)         at org.mmbase.module.database.MultiPool.getFree(Unknown Source)         at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)         at org.mmbase.module.database.JDBC.getConnection(Unknown Source)         at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source) Should perhaps be solved by a decent producer/consument model: http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html
Hide
Michiel Meeuwissen added a comment - 2002-10-10 15:24
MultiPool.getFree can fail.
2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas
e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
        at java.util.Vector.elementAt(Vector.java:412)
        at org.mmbase.module.database.MultiPool.getFree(Unknown Source)
        at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)
        at org.mmbase.module.database.JDBC.getConnection(Unknown Source)
        at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source)

Should perhaps be solved by a decent producer/consument model:
http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html
Show
Michiel Meeuwissen added a comment - 2002-10-10 15:24 MultiPool.getFree can fail. 2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0         at java.util.Vector.elementAt(Vector.java:412)         at org.mmbase.module.database.MultiPool.getFree(Unknown Source)         at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)         at org.mmbase.module.database.JDBC.getConnection(Unknown Source)         at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source) Should perhaps be solved by a decent producer/consument model: http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html
Hide
Michiel Meeuwissen added a comment - 2002-10-10 16:46
MultiPool.getFree can fail.
2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas
e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
        at java.util.Vector.elementAt(Vector.java:412)
        at org.mmbase.module.database.MultiPool.getFree(Unknown Source)
        at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)
        at org.mmbase.module.database.JDBC.getConnection(Unknown Source)
        at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source)

Should perhaps be solved by a decent producer/consument model:
http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html

--> this is bug 2669
Show
Michiel Meeuwissen added a comment - 2002-10-10 16:46 MultiPool.getFree can fail. 2002-10-10 14:13:57,528 ERROR mmbase.module.core.MMBase - Can't get a JDBC connection (JDBC module error : host: 'localhost' port: '3306' databas e: 'bbol2_db' user: 'url' driver: 'org.gjt.mm.mysql.Driver')java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 2002-10-10 14:14:14,953 ERROR mmbase.module.core.MMBase - java.lang.ArrayIndexOutOfBoundsException: 0 >= 0         at java.util.Vector.elementAt(Vector.java:412)         at org.mmbase.module.database.MultiPool.getFree(Unknown Source)         at org.mmbase.module.database.MultiPoolHandler.getConnection(Unknown Source)         at org.mmbase.module.database.JDBC.getConnection(Unknown Source)         at org.mmbase.module.database.support.MMSQL92Node.getConnection(Unknown Source) Should perhaps be solved by a decent producer/consument model: http://java.sun.com/docs/books/tutorial/essential/threads/synchronization.html --> this is bug 2669
Hide
Michiel Meeuwissen added a comment - 2008-07-16 00:22
I'm not sure the issue can effectively still occur.

If it is, and it bothers you, please consider using the connection pool of your app-server in stead.
Show
Michiel Meeuwissen added a comment - 2008-07-16 00:22 I'm not sure the issue can effectively still occur. If it is, and it bothers you, please consider using the connection pool of your app-server in stead.

People

Dates

  • Created:
    2002-10-10 20:32
    Updated:
    2008-07-16 00:48
    Resolved:
    2008-07-16 00:22