Как настроить Hibernate в JBoss

Я создаю приложение для запуска на JBoss, используя Hibernate. Когда я запускаю приложение, я получаю следующую ошибку:

    21:15:55,848 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH000319: Could not get database metadata: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/researchprojects
    at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_20]
    at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_20]
    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_20]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_20]

21:15:55,911 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH000299: Could not complete schema update: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/researchprojects
    at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_20]
    at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_20]
    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_20]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_20]

Я включил драйвер mysql в папку WEB-INF / lib и добавил его в путь сборки. Я не изменил файл standalone.xml, поскольку включил всю необходимую информацию о подключении к базе данных в файле persistence.xml.

Persistence.xml выглядит так:


  
  org.hibernate.ejb.HibernatePersistence    
            
    
          
         
      
       
      
        
        
                   
    
  

Кто-нибудь может дать подсказку, как решить эту проблему? Я просмотрел все похожие посты перед публикацией здесь, но мне ничего не помогло.

Ответы на вопрос(2)

Ваш ответ на вопрос