Java 春季及;Hibernate c3p0错误无法完成架构验证

Java 春季及;Hibernate c3p0错误无法完成架构验证,java,spring,hibernate,caching,c3p0,Java,Spring,Hibernate,Caching,C3p0,在我们的项目中,我们使用Spring和Hibernate。在服务器和其他开发人员计算机上,项目成功运行。然而,在我用SVN更新了我的项目之后,我得到了一个错误列表,它已经关闭了,我有两天没能解决它。我读过很多关于它的文章,并尝试过,但问题并没有解决。甚至,我已经完全删除了项目,并再次签出,恢复数据库,但没有任何改变。MySql已检查并正常工作 这里有错误: Unable to find org.hibernate.search.event.FullTextIndexEventListener o

在我们的项目中,我们使用Spring和Hibernate。在服务器和其他开发人员计算机上,项目成功运行。然而,在我用SVN更新了我的项目之后,我得到了一个错误列表,它已经关闭了,我有两天没能解决它。我读过很多关于它的文章,并尝试过,但问题并没有解决。甚至,我已经完全删除了项目,并再次签出,恢复数据库,但没有任何改变。MySql已检查并正常工作

这里有错误:

Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
2013-01-16 04:36:22,512 ERROR [org.hibernate.tool.hbm2ddl.SchemaValidator] - could not complete schema validation
java.sql.SQLException: Connections could not be acquired from the underlying database!
...
2013-01-16 04:36:22,526 WARN [net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory] - Couldn't find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults.
2013-01-16 04:36:33,475 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@10dba0d -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2013-01-16 04:36:33,476 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@10dba0d -- APPARENT DEADLOCK!!! Complete Status:
    Managed Threads: 1
Active Threads: 1
Active Tasks: 
    com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3128482b (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
Pending Tasks: 
    com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4b9a1843
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
    java.lang.Thread.sleep(Native Method)
    com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
    com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
2013-01-16 04:36:51,878 WARN [com.mchange.v2.resourcepool.BasicResourcePool] - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3128482b -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:223)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
这里是Hiernate>C3P0conf

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    <property name="jdbcUrl" value="${jdbc.url}" />
    <property name="user" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    <property name="initialPoolSize" value="1" />
    <property name="minPoolSize" value="1" />
    <property name="maxPoolSize" value="5" />
    <property name="idleConnectionTestPeriod" value="500" />
    <property name="acquireIncrement" value="1" />
    <property name="maxStatements" value="50" /> <!-- I tried this value = 0 it does not work -->
    <property name="numHelperThreads" value="1" />
</bean>
Ehcahce.xml

<?xml version="1.0" encoding="UTF-8"?>



我是Spring和Hibernate的新手,在阅读文章时,这些代码块很重要,应该加以管理。如果需要任何其他代码块,请对其进行注释

您应该在数据源bean中放入以下行

<property name="driverClass" value="${jdbc.driverClassName}" />


应该有更多的堆栈跟踪,但我猜您的类路径中没有MySQL的JAR文件。是的,有更多的堆栈跟踪,我刚刚在这里写下了错误消息。Maven Dependencies中有mysql-connector-java-5.1.12.jar。也许您的项目中没有包含mysql JDBC jar?5年后,我只能说这是一段美好的时光,我一直在从事一个定制t-sirts的项目!一个人应该具备所有的理论知识。。。顺便说一下,我在控制台中有一条消息:`name:MySQL版本:5.0.96-community-nt-major:5-minor:0 2013-01-16 08:02:59907信息[org.hibernate.cfg.SettingsFactory]-驱动程序->name:MySQL-AB-JDBC驱动程序版本:MySQL-connector-java-5.1.12(版本:${bzr.Revision id})大调:5小调:1`这会给我带来麻烦吗?试试:hibernate.dialen=org.hibernate.dialen.mysqldialen而不是mysql5dialen
<cache
    name="org.hibernate.cache.UpdateTimestampsCache"
    maxElementsInMemory="50000"
    eternal="true"
    overflowToDisk="true"/>

<defaultCache
    maxElementsInMemory="10000"
    eternal="false"
    timeToIdleSeconds="120"
    timeToLiveSeconds="120"
    overflowToDisk="true"
    maxElementsOnDisk="10000000"
    diskPersistent="false"
    diskExpiryThreadIntervalSeconds="120"
    memoryStoreEvictionPolicy="LRU"/>

<cache
    name="ncStandardElements"
    maxElementsInMemory="100000"
    eternal="false"
    overflowToDisk="true"
    timeToLiveSeconds="600"/>

<cache
    name="ncOrderElements"
    maxElementsInMemory="100000"
    eternal="false"
    overflowToDisk="true"
    timeToLiveSeconds="60"/>

<cache
    name="ncAdminElements"
    maxElementsInMemory="100000"
    eternal="false"
    overflowToDisk="true"
    timeToLiveSeconds="60"/>
<property name="driverClass" value="${jdbc.driverClassName}" />