Pool de connexion avec struts
Bonjour, je voudrais mettre en place le pool de connexion pour un projet en struts.
J'ai déclaré dans le fichier struts-config.xml, les paramètres suivants:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| <data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
<set-property property="url" value="jdbc:mysql://localhost/ComputerStore" />
<set-property property="username" value="root" />
<set-property property="password" value="" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />
</data-source>
</data-sources> |
Et, j'ai importé le jar "commons-dbcp-1.2.1.jar"
Quand je lance le serveur Tomcat, voilà le message d'erreur que j'ai:
Code:
1 2 3 4 5 6 7 8
| GRAVE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
etc... |
Merci, d'avance!!