2 Replies Latest reply on Jan 5, 2012 9:20 PM by mi haisheng

    No suitable driver found for jdbc:mysql

    mi haisheng Newbie
      this is mysql jdbc
      --------------------
          <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <version>5.1.18</version>
           </dependency>
      --------------------
      this is persistence.xml
      --------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
          version="2.0">
          <persistence-unit name="biz"  transaction-type="JTA">
         
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
               <class>Person</class>
              <properties>
                  <!-- Properties for Hibernate (default provider for JBoss AS) -->
                  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
                     <property name="hibernate.connection.username" value="root" />
                             <property name="hibernate.connection.password" value="root" />
                             <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
                             <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/testdb" />
                  <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                  <property name="hibernate.show_sql" value="true"/>
                  <!-- Only format when you need to debug, because it slows things down -->
                  <property name="hibernate.format_sql" value="false"/>
                  <property name="hibernate.show_sql" value="false" />
              </properties>
          </persistence-unit>
      </persistence>
      -----------------------------------------

        when  jboss-as7-final deploying the project,the message says that:"No suitable driver found for jdbc:mysql...".
        what can i do,mysql is 5.