You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Nydia <Da...@yahoo.com.cn> on 2007/07/27 10:01:16 UTC
Borrow prepareStatement from pool failed (JDBC + Mysql)
I use the JDBC+Mysql for persistent,and the activemq-xml's configure just
like the follows(I think has no error):
<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#mysql-ds"/>
</persistenceAdapter>
<!-- MySql DataSource Sample Setup -->
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
<property name="username" value="root"/>
<property name="password" value=""/>
<property name="poolPreparedStatements" value="true"/>
</bean>
I had created the database :activemq .And then ,I run the server,it throwed
out the exceptions:
.....activemq.store.jdbc.DefaultDatabase
Locker.start(DefaultDatabaseLocker.java:65) - Failed to acquire lock:
org.apache
.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from
pool fa
iled.......
I checked the mysql and found that the three tables:
ACTIVEMQ_ACKS
ACTIVEMQ_LOCK
activemq_msgs
had been created successfully! So could someone tell me why?
--
View this message in context: http://www.nabble.com/Borrow-prepareStatement-from-pool-failed-%EF%BC%88JDBC-%EF%BC%8B-Mysql%EF%BC%89-tf4155991s2354.html#a11824614
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Borrow prepareStatement from pool failed (JDBC + Mysql)
Posted by Nydia <Da...@yahoo.com.cn>.
i fixed the problem,it was about the jdbc-driver of the mysql
--
View this message in context: http://www.nabble.com/Borrow-prepareStatement-from-pool-failed-%EF%BC%88JDBC-%EF%BC%8B-Mysql%EF%BC%89-tf4155991s2354.html#a11858487
Sent from the ActiveMQ - User mailing list archive at Nabble.com.