title: Error trying to configure Tomcat Global JNDI ConnectionPool with BoneCP
body: <p>I have the following files in C:\Tomcat5.5\common\lib</p>
  
  <p>activation.jar<br>
  bonecp-0.7.1.RELEASE.jar<br>
  commons-el.jar<br>
  ecj-3.7.2.jar<br>
  guava-15.0.jar<br>
  jasper-compiler.jar<br>
  jasper-runtime.jar<br>
  jsp-api.jar<br>
  jtds-1.3.1.jar<br>
  log4j-1.2.17.jar<br>
  mail.jar<br>
  naming-factory-dbcp.jar<br>
  naming-factory.jar<br>
  naming-resources.jar<br>
  servlet-api.jar<br>
  slf4j-api-1.7.5.jar</p>
  
  <p>I have the following in server.xml</p>
  
  <pre><code>&lt;Resource 
  auth="Container"
  driverClassName="net.sourceforge.jtds.jdbc.Driver"  
  type="com.jolbox.bonecp.BoneCPDataSource"
  idleMaxAge="240"
  idleConnectionTestPeriod="60"
  partitionCount="3"
  acquireIncrement="1"
  maxConnectionsPerPartition="10"
  minConnectionsPerPartition="3"
  statementsCacheSize="50"
  releaseHelperThreads="4"
  
  name="jdbc/MyDatasource"
  jdbcUrl="jdbc:jtds:sqlserver://localhost:1433;databaseName=ROWAN-UK;integratedSecurity=true;"
  username="rowanadmin" 
  password="aeibP4wwZgr"
  factory="org.apache.naming.factory.BeanFactory"/&gt; 
  </code></pre>
  
  <p>and the following in C:\Tomcat5.5\conf\context.xml:</p>
  
  <pre><code>&lt;Context&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
      &lt;ResourceLink global="jdbc/MyDatasource" name="jdbc/MyDatasource" type="com.jolbox.bonecp.BoneCPDataSource"/&gt;
  
      &lt;!-- Default set of monitored resources --&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
  
      &lt;!-- Uncomment this to disable session persistence across Tomcat restarts --&gt;
      &lt;!--
      &lt;Manager pathname="" /&gt;
      --&gt;
  
  &lt;/Context&gt;
  </code></pre>
  
  <p>I get the following in Tomcat5-stdout.log:</p>
  
  <blockquote>
    <p>2013-09-22 21:28:52 Commons Daemon procrun stdout initialized SLF4J:
    Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J:
    Defaulting to no-operation (NOP) logger implementation SLF4J: See
    <a href="http://www.slf4j.org/codes.html#StaticLoggerBinder" rel="nofollow">http://www.slf4j.org/codes.html#StaticLoggerBinder</a> for further
    details. java.lang.reflect.InvocationTargetException  at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
    java.lang.reflect.Method.invoke(Unknown Source)   at
    org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)   at
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused
    by: java.lang.IllegalAccessError: tried to access method
    com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
    from class com.jolbox.bonecp.BoneCPDataSource     at
    com.jolbox.bonecp.BoneCPDataSource.(BoneCPDataSource.java:64)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)   at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
    Source)   at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)     at
    java.lang.Class.newInstance(Unknown Source)   at
    org.apache.naming.factory.BeanFactory.getObjectInstance(BeanFactory.java:143)
      at
    org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
      at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
      at org.apache.naming.NamingContext.lookup(NamingContext.java:793)   at
    org.apache.naming.NamingContext.lookup(NamingContext.java:140)    at
    org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
      at
    org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
      at
    org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
      at
    org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:144)
      at
    org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
      at
    org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
      at
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
      at
    org.apache.catalina.core.StandardServer.start(StandardServer.java:693)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:552)    ...
    6 more</p>
  </blockquote>