title: Scalikejdbc teradata "Connection pool is not yet initialized."
body: <p>I'm trying to use ScalikeJdbc with Teradata but can't seem to get it to work. I have a configuration file:</p>
  
  <pre><code>application.conf
  
  # JDBC settings
  db.default.user="user"
  db.default.password="pass"
  # Connection Pool settings
  db.default.poolInitialSize=10
  db.default.poolMaxSize=20
  db.default.connectionTimeoutMillis=1000
  
  # Teradata
  db.default.driver="com.teradata.jdbc.TeraDriver"
  db.default.url="jdbc:teradata://url/database=db"
  </code></pre>
  
  <p>The code looks like this:</p>
  
  <pre><code>import scalikejdbc._
  import scalikejdbc.config._
  
  
  object DBObject {
    DBs.setupAll()
  
    case class Ad(id: Long, siteId: Int)
    object Ad extends SQLSyntaxSupport[Ad] {
      override val tableName = "ad_table"
  
      def apply(rs: WrappedResultSet) = new Ad(rs.long("id"), rs.int("ad"))
    }
  
    ConnectionPool.borrow("default")
    val ad = Ad.syntax("ad")
    val ads = DB(ConnectionPool.borrow()) readOnly { implicit session =&gt;
      withSQL {
        select.from(Ad as ad).where.eq(ad.siteId, 3001).limit(10)
      }.map(rs =&gt; Ad(rs)).list.apply
    }
  }
  </code></pre>
  
  <p>While running this example it throws an exception: <code>Connection pool is not yet initialized.</code>
  What am I missing here?</p>