commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garey Mills <gmi...@berkeley.edu>
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" 
xmlns="http://apache.org/xml/xmlns/jakarta/commons/jocl">
   <!-- 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"/>
   </object>
   <!-- the next argument is the ObjectPool -->
   <object class="org.apache.commons.pool.impl.GenericObjectPool">
      <object class="org.apache.commons.pool.PoolableObjectFactory" 
null="true"/>
      <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 -->
   </object>
   <!-- the next argument is the KeyedObjectPoolFactory -->
   <object class="org.apache.commons.pool.StackKeyedObjectPoolFactory">
      <int value="5"/> <!-- max idle -->
   </object>
   <string value="SELECT COUNT(*) FROM DUAL"/> <!-- validation query -->
   <boolean value="false"/> <!-- default read only -->
   <boolean value="true"/> <!-- default auto commit -->
</object>

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

values.

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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message