title: MyBatis Error: Invalid bound statement (not found)
body: <p>Here is the stack trace when I try to execute a simple query using MyBatis:</p>
  
  <pre><code>org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ppcredit.gypsophila.mapper.GypsophilaVarsStatisticsMapper.selectBySql
      at org.apache.ibatis.binding.MapperMethod$SqlCommand.&lt;init&gt;(MapperMethod.java:225)
      at org.apache.ibatis.binding.MapperMethod.&lt;init&gt;(MapperMethod.java:48)
      at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
      at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
      at com.sun.proxy.$Proxy110.selectBySql(Unknown Source)
  </code></pre>
  
  <p>Here is a method from my class:</p>
  
  <pre><code>/**
   * use the sql to query result
   *
   * @param sql
   * @return
   */
  List&lt;LinkedHashMap&lt;String, Object&gt;&gt; selectBySql(String sql, Map&lt;String, Object&gt; parms);
  </code></pre>
  
  <p>In this case, need want to execute SQL statement directly, the sql as below:</p>
  
  <pre><code>SELECT VELOCITY_VARS FROM PPC_GYPSOPHILA_VARS_STATISTICS WHERE SCENARIO_ID=#{scenarioId} and TACTIC_ID=#{flowId} and CREATE_USER=#{userId}
  </code></pre>
  
  <p>all parameters of sql can be found in <code>Map&lt;String, Object&gt; parms</code></p>
  
  <p>I've done some research, but none of the solutions have worked for me. My Mapper class seems have some problems, but i dont know what's wrong.
  Does anyone have an idea what's wrong here?
  Thanks in advance</p>