title: mybatis cannot generator using oracle database
body: <p>I got a <code>generatorConfig.xml</code> like this:</p>
  
  <pre><code>&lt;generatorConfiguration&gt;
      &lt;classPathEntry location="D:\Workspace\springlt\src\main\resources\ojdbc6.jar" /&gt;
  
      &lt;context id="MyBatis3" targetRuntime="MyBatis3"&gt;
          &lt;commentGenerator&gt;
              &lt;property name="suppressAllComments" value="true" /&gt;
          &lt;/commentGenerator&gt;
  
          &lt;jdbcConnection driverClass="com.mysql.jdbc.Driver"
              connectionURL="myurl" userId="username"
              password="password"&gt;
          &lt;/jdbcConnection&gt;
  
          &lt;javaModelGenerator targetPackage="vn.laptrinh.domain"
              targetProject="../java" /&gt;
  
          &lt;sqlMapGenerator targetPackage="vn.laptrinh.dao.xml"
              targetProject="../java" /&gt;
  
          &lt;javaClientGenerator type="XMLMAPPER"
              targetPackage="vn.laptrinh.dao" targetProject="../java" /&gt;
  
          &lt;!-- &lt;table tableName="users" domainObjectName="User"
              enableSelectByExample="false" enableDeleteByExample="false"
              enableCountByExample="false" enableUpdateByExample="false"&gt;
              &lt;columnOverride column="id" javaType="Long" /&gt;
          &lt;/table&gt; --&gt;
  
          &lt;table tableName="CARDUSER_MASTER" domainObjectName="CardUserMaster"
              schema="CACISISS" enableSelectByExample="false"
              enableDeleteByExample="false" enableCountByExample="false"
              enableUpdateByExample="false"&gt;
          &lt;/table&gt;
      &lt;/context&gt;
  &lt;/generatorConfiguration&gt;
  </code></pre>
  
  <p>Previously, I use mysql database and I put <code>mysql-connector-java-5.1.15-bin.jar</code> and <code>mybatis-generator-core-1.3.1.jar</code> in ..\springlt\src\main\resources folder, then use command line to <code>run java -jar mybatis-generator-core-1.3.1.jar -configfile generatorConfig.xml -overwrite -tables users</code>, project will generate <code>domain, xml, xmlmapper</code></p>
  
  <p>However when I change <code>mysql-connector-java-5.1.15-bin.jar</code> to <code>ojdbc6.jar</code> (I'm using oracle 11g), then I run and got bunches of errors: </p>
  
  <pre><code>D:\Workspace\springlt\src\main\resources&gt;java -jar mybatis-generator-core-1.3.1.
  jar -configfile generatorConfig.xml
  Exception in thread "main" java.lang.RuntimeException: Exception getting JDBC Dr
  iver
          at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(Connect
  ionFactory.java:85)
          at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(Con
  nectionFactory.java:54)
          at org.mybatis.generator.config.Context.getConnection(Context.java:498)
          at org.mybatis.generator.config.Context.introspectTables(Context.java:40
  8)
          at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.
  java:221)
          at org.mybatis.generator.api.ShellRunner.main(ShellRunner.java:117)
  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at org.mybatis.generator.internal.ObjectFactory.externalClassForName(Obj
  ectFactory.java:90)
          at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(Connect
  ionFactory.java:82)
          ... 5 more
  </code></pre>
  
  <p>I dont' know what is the problem is. I connect to database located on server. </p>
  
  <p>Any solutions would be appreciated. Thanks.</p>