Re: Using jdbcdslog with H2 db and mybatis

84 views
Skip to first unread message
Message has been deleted

Ashok Ganesan

unread,
Oct 8, 2013, 12:40:26 PM10/8/13
to jdbcdslo...@googlegroups.com
Error log for the above config.

### Cause: java.sql.SQLException: No suitable driver found for jdbc:jdbcdslog:h2:/data/db;targetDriver=org.h2.Driver
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
        at com.peaxy.db.DatabaseService$Txn.select(DatabaseService.java:183)

Ashok Ganesan

unread,
Oct 8, 2013, 1:00:58 PM10/8/13
to jdbcdslo...@googlegroups.com
Got it working now with DriverLoggingProxy


On Monday, October 7, 2013 11:06:33 PM UTC-7, Ashok Ganesan wrote:
I'm trying to use jdbcdslog with H2 db and mybatis, using the below configuration in the url param.

    <environments default="development">
        <environment id="development">
            <transactionManager type="JDBC" />
            <dataSource type="UNPOOLED">
                <property name="driver" value="org.jdbdslog:DriverLoggingProxy" />
                <property name="url" value="jdbc:jdbcdslog:h2:/data/db;targetDriver=org.h2.Driver" />
                <property name="username" value="" />
                <property name="password" value="" />
            </dataSource>
        </environment>
    </environments>

But I'm getting no such driver exception. Can you please let me know how to configure it correctly ?

### Cause: java.sql.SQLException: No suitable driver found for jdbc:jdbcdslog:hsqldb:/usr/hf/data/sql_db/msp;targetDriver=org.hsqldb.jdbcDriver

        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)

I tried using the targetDS param for dataSource, but that fails with unknown param for mybatis datasource.

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.datasource.DataSourceException: Unknown DataSource property: targetDS
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
        at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:79
Reply all
Reply to author
Forward
0 new messages