I’m running a very simple query in order to use Spring,Mybatis and kdb in my project. The query runs fine when I do it directly or use the jdbc connection outside mybatis but I’m getting an error from kdb driver when I it with mybatis
### SQL: q)select instrument from index_pricing_history where date=2014.11.18,sym =
FEDSOPEN### Cause: java.sql.SQLException: col 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 org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:94) at com.hmkcode.dao.PersonDAO.selectAll(PersonDAO.java:32) at hmkcode.Main.main(Main.java:24)Caused by: java.sql.SQLException: col at jdbc.q(jdbc.java:21) at jdbc$rm.getColumnClassName(jdbc.java:535)`
Has anyone seen this before?
I modified jdbc.java
public String getColumnClassName(int column)throws SQLException{return getColumnName(column);}
and now it’s working. I’m not sure if this will cause other problems. I’m running KDB version 3.0
I’m not familiar enough with kdb to figure out what
q("col")
in
` public String getColumnClassName(int column)throws SQLException{q("col");return null;}`
<font face='"arial,' sans-serif>does and why it was not working for me. Is this deprecated? </font>
<font face='"arial,' sans-serif><br></font>
On Friday, December 5, 2014 1:45:26 PM UTC-5, Bardiya Choupani wrote:
I’m running a very simple query in order to use Spring,Mybatis and kdb in my project. The query runs fine when I do it directly or use the jdbc connection outside mybatis but I’m getting an error from kdb driver when I it with mybatis
### SQL: q)select instrument from index_pricing_history where date=2014.11.18,sym =
FEDSOPEN### Cause: java.sql.SQLException: col 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 org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:94) at com.hmkcode.dao.PersonDAO.selectAll(PersonDAO.java:32) at hmkcode.Main.main(Main.java:24)Caused by: java.sql.SQLException: col at jdbc.q(jdbc.java:21) at jdbc$rm.getColumnClassName(jdbc.java:535)`
Has anyone seen this before?