-
Notifications
You must be signed in to change notification settings - Fork 5
Evgeniy Sinev edited this page Sep 2, 2015
·
2 revisions
#FAQ
java.sql.SQLException: No access to parameters by name when connection has been configured not to access procedure bodies
Use Index strategy to fill arguments for Guice
install(new InitJdbcProcModule() {
@Override
protected void bindCallableStatementSetStrategyFactory(AnnotatedBindingBuilder<ICallableStatementSetStrategyFactory> aBuilder) {
aBuilder.to(CallableStatementSetStrategyFactoryIndexImpl.class);
}
});
- Add additional parameters to jdbc url:
- useInformationSchema = true
- noAccessToProcedureBodies = true
- useLocalSessionState = true
For example:
jdbc:mysql://localhost:3306/database
?logger=Slf4JLogger
&autoReconnect=false
&characterEncoding=utf8
&useInformationSchema=true
&noAccessToProcedureBodies=true
&useLocalSessionState=true
&profileSQL=false
- Download https://github.com/payneteasy/jdbc-proc/blob/master/mysql-driver/mysql-connector-java-5.1.22-3-bin.jar?raw=true
- Install this file to maven repository:
mvn install:install-file -DgroupId=mysql -DartifactId=mysql-connector-java \
-Dversion=5.1.22-3 -Dpackaging=jar \
-Dfile=mysql-connector-java-5.1.22-3-bin.jar
This driver uses patches: