Github user mars commented on the issue:

    https://github.com/apache/incubator-predictionio-template-skeleton/pull/5
  
    I've been trying to support `DataSourceTest` using an in-memory H2 
database. Unfortunately, that's currently failing with:
    
    ```
    [info] DataSourceTest:
    [info] readTraining
    [info] - should return the data *** FAILED ***
    [info]   java.lang.IllegalStateException: Connection pool is not yet 
initialized.(name:'default)
    [info]   at 
scalikejdbc.ConnectionPool$$anonfun$get$1.apply(ConnectionPool.scala:57)
    [info]   at 
scalikejdbc.ConnectionPool$$anonfun$get$1.apply(ConnectionPool.scala:55)
    [info]   at scala.Option.getOrElse(Option.scala:120)
    [info]   at scalikejdbc.ConnectionPool$.get(ConnectionPool.scala:55)
    [info]   at scalikejdbc.ConnectionPool$.apply(ConnectionPool.scala:46)
    [info]   at scalikejdbc.DB$.connectionPool(DB.scala:150)
    [info]   at scalikejdbc.DB$.autoCommit(DB.scala:213)
    [info]   at 
org.apache.predictionio.data.storage.jdbc.JDBCApps.<init>(JDBCApps.scala:32)
    [info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
    [info]   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    ```
    
    …which seems to be caused by [this `DB autoCommit` call in the JDBC 
initializer](https://github.com/apache/incubator-predictionio/blob/release/0.10.0/data/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCApps.scala#L32).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to