commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garey Mills <>
Subject Problem with commons-dbcp jocl file
Date Thu, 15 Mar 2007 19:44:31 GMT
Hello - Following the instructions the javadocs for

    Package org.apache.commons.dbcp

I created the following jocl file and put it in my WEB-INF/classes directory

<object class="org.apache.commons.dbcp.PoolableConnectionFactory" 
   <!-- the first argument is the ConnectionFactory -->
   <object class="org.apache.commons.dbcp.DriverManagerConnectionFactory">
      <string value="jdbc:mysql://localhost:<my port>/<mydb>?user=<my 
user>&password=<my password"/>
      <object class="java.util.Properties" null="true"/>
   <!-- the next argument is the ObjectPool -->
   <object class="org.apache.commons.pool.impl.GenericObjectPool">
      <object class="org.apache.commons.pool.PoolableObjectFactory" 
      <int value="10"/> <!-- max active -->
      <byte value="1"/> <!-- when exhausted action, 0 = fail, 1 = block, 
2 = grow -->
      <long value="2000"/> <!-- max wait -->
      <int value="10"/> <!-- max idle -->
      <boolean value="false"/> <!-- test on borrow -->
      <boolean value="false"/> <!-- test on return -->
      <long value="10000"/> <!-- time between eviction runs -->
      <int value="5"/> <!-- number of connections to test per eviction 
run -->
      <long value="5000"/> <!-- min evictable idle time -->
      <boolean value="true"/> <!-- test while idle -->
   <!-- the next argument is the KeyedObjectPoolFactory -->
   <object class="org.apache.commons.pool.StackKeyedObjectPoolFactory">
      <int value="5"/> <!-- max idle -->
   <string value="SELECT COUNT(*) FROM DUAL"/> <!-- validation query -->
   <boolean value="false"/> <!-- default read only -->
   <boolean value="true"/> <!-- default auto commit -->

Where <my port>, <my db>, <my user> and <my password> have the correct


When I try to get a connection, I get the following error:

[Fatal Error] :4:82: The reference to entity "password" must end with 
the ';' delimiter.
SQL Exception caught: org.apache.commons.dbcp.SQLNestedException: Could 
not parse configuration file

Has anyone seen this before? Any suggestions?

All help appreciated;

Garey Mills

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message