jboss-as-7.1.1.Final:此连接URL [jdbc:mysql:// localhost:3306 / dossierm]的驱动程序类[类org.h2.Driver]错误

时间:2018-12-25 18:27:41

标签: jboss

ejb项目无法创建数据库

我有这个错误,请帮助我

在org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:251)     ...另外28个

19:11:50,423错误[org.hibernate.tool.hbm2ddl.SchemaExport](MSC服务线程1-6)HHH000231:架构导出失败:java.sql.SQLException:javax.resource.ResourceException:IJ000453:无法获取java:/ dossierm的托管连接     在org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)     在org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67)处[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)上[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.tool.hbm2ddl.DatabaseExporter。(DatabaseExporter.java:52)[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:368)上[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:305)[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:294)[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.internal.SessionFactoryImpl。(SessionFactoryImpl.java:452)[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)上[hibernate-core-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.ejb.EntityManagerFactoryImpl。(EntityManagerFactoryImpl.java:84)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]     在org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)处[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]     在org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)上[jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]     在org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)上[jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]     在org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1811)     在org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1746)     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_03]     在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_03]     在java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_03] 引起原因:javax.resource.ResourceException:IJ000453:无法获取java:/ dossierm的托管连接     在org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390)     在org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)     在org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)     在org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)     ...另外19个 原因:javax.resource.ResourceException:IJ000658:尝试创建连接时发生意外抛出:null     在org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:371)     在org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)     在org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)     在org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)     ...另外22个 原因:javax.resource.ResourceException:无法创建连接     在org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)     在org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)     在org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)     在org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)     ...另外25个 由以下原因引起:javax.resource.ResourceException:此连接URL [jdbc:mysql:// localhost:3306 / dossierm]的驱动程序类[类org.h2.Driver]错误     在org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:251)     ...另外28个

19:11:50,481信息[org.hibernate.tool.hbm2ddl.SchemaExport](MSC服务线程1-6)HHH000230:模式导出完成 19:11:50,644信息[org.jboss.as.server](DeploymentScanner-threads-2)JBAS018565:将部署“ dm_ejb.jar”替换为部署“ dm_ejb.jar”

persistence.xml

standalone.xml

1 个答案:

答案 0 :(得分:0)

根据提供的日志:

  

此连接URL [jdbc:mysql:// localhost:3306 / dossierm]的驱动程序类[类org.h2.Driver]错误

驱动程序类org.h2.Driver或连接URL不正确。

Connection URLs for H2jdbc:h2:开头

JBoss AS文档介绍了如何在应用程序中使用MySQL Connector。