Skip to content
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);
            }
        });

How to optimise mysql-jdbc drivers calls

  • Add additional parameters to jdbc url:
  1. useInformationSchema = true
  2. noAccessToProcedureBodies = true
  3. useLocalSessionState = true

For example:

jdbc:mysql://localhost:3306/database
 ?logger=Slf4JLogger
 &autoReconnect=false
 &characterEncoding=utf8
 &useInformationSchema=true
 &noAccessToProcedureBodies=true
 &useLocalSessionState=true
 &profileSQL=false
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:

Clone this wiki locally