org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The connection property 'autoReconnect' only accepts values of the form: 'true', 'false', 'yes' or 'no'. The value 'true;connectTimeout=360000;socketTimeout=360000' is not in this set.)
Asked
Active
Viewed 134 times
0
1 Answers
1
&
is a special character in XML and needs to be escaped as &
. Try the following configuration:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/db?autoReconnect=true&connectTimeout=360000&socketTimeout=360000" />
<property name="username" value="root" />
<property name="password" value="mysql" />
<property name="initialSize" value="5" />
<property name="maxActive" value="10" />
</bean>

Christophe L
- 13,725
- 6
- 33
- 33