New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly improved compatibility with drivers that only support JDBC 3 API #1386

Closed
fmodesto opened this Issue Nov 15, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@fmodesto
Copy link

fmodesto commented Nov 15, 2018

Commit: a154e54
BaseExecutor.closeStatement() invokes statement.isClosed() which is from java 1.6
This crashed with old drivers:

java.lang.AbstractMethodError: Method com/ibm/db2/jcc/am/zo.isClosed()Z is abstract
	at com.ibm.db2.jcc.am.zo.isClosed(Unknown Source) ~[db2jcc-v10.5FixPak06.jcc4.19.26.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_162]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_162]
	at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) ~[tomcat-jdbc-8.5.27.jar:na]
	at com.sun.proxy.$Proxy113.isClosed(Unknown Source) ~[na:na]
	at org.apache.ibatis.executor.BaseExecutor.closeStatement(BaseExecutor.java:285) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:326) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.4.6.jar:3.4.6]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_162]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_162]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-1.3.2.jar:1.3.2]
	at com.sun.proxy.$Proxy71.selectList(Unknown Source) ~[na:na]
	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) ~[mybatis-spring-1.3.2.jar:1.3.2]
@harawata

This comment has been minimized.

Copy link
Member

harawata commented Nov 15, 2018

I was aware [1], but I'll revert the commit as calling isClosed() is not important there.

Note that MyBatis 3.5.0 requires Java 8 which means it does not support such an old driver officially.
And there will be some functionalities that use newer JDBC API.

[1] https://groups.google.com/d/msg/mybatis-user/qYH1oeRTdBU/uwqyXwIeCgAJ

@harawata harawata closed this in 8800351 Nov 15, 2018

@kazuki43zoo kazuki43zoo added this to the 3.5.0 milestone Nov 15, 2018

kazuki43zoo added a commit to kazuki43zoo/mybatis-3 that referenced this issue Nov 15, 2018

harawata added a commit that referenced this issue Nov 16, 2018

@harawata harawata changed the title Breaking change: a154e545a6e65dd1bb886aea4569bd5bdd7110a0 Slightly improved compatibility with drivers that only support JDBC 3 API Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment