>>proxooll连接池问题
proxool.xml配置如下:<something-else-entirely><proxool><alias>dbs</alias><driver-url>jdbc:...
proxool.xml配置如下:
<something-else-entirely>
<proxool>
<alias>dbs</alias>
<driver-url>jdbc:mysql://localhost:3306/libdb</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties>
<property name="user" value="root"/>
<property name="password" value="sa"/>
</driver-properties>
<!-- <house-keeping-test-sql>
select CURRENT_DATE
</house-keeping-test-sql>-->
<maximum-connection-count>10</maximum-connection-count>
</proxool>
</something-else-entirely>
web.xml配置如下:
<servlet>
<servlet-name>ServletConfigurator</servlet-name>
<servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
<init-param>
<param-name>xmlFile</param-name>
<param-value>WEB-INF/proxool.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>admin</servlet-name>
<servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>admin</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
测试类:
import java.sql.*;
public class Dbc {
Connection conn;
PreparedStatement ps;
Statement stmt;
ResultSet rs;
int num;
public Dbc() {
try {
conn = DriverManager.getConnection("proxool.dbs");
if (conn != null) {
System.out.println("=============Success.");
} else {
System.out.println("===============Fail.");
}
ps = null;
stmt = conn.createStatement();
rs = null;
num = 0;
} catch (Exception e) {
System.out.println("==========" + e);
}
}
public static void main(String agrs[]) {
new Dbc();
}
}
异常:java.sql.SQLException: No suitable driver found for proxool.dbs
所用jar包:
mysql-connector-java-5.1.5-bin.jar
commons-logging.jar
proxool-0.9.1.jar
======================
求解? 展开
<something-else-entirely>
<proxool>
<alias>dbs</alias>
<driver-url>jdbc:mysql://localhost:3306/libdb</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties>
<property name="user" value="root"/>
<property name="password" value="sa"/>
</driver-properties>
<!-- <house-keeping-test-sql>
select CURRENT_DATE
</house-keeping-test-sql>-->
<maximum-connection-count>10</maximum-connection-count>
</proxool>
</something-else-entirely>
web.xml配置如下:
<servlet>
<servlet-name>ServletConfigurator</servlet-name>
<servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
<init-param>
<param-name>xmlFile</param-name>
<param-value>WEB-INF/proxool.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>admin</servlet-name>
<servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>admin</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
测试类:
import java.sql.*;
public class Dbc {
Connection conn;
PreparedStatement ps;
Statement stmt;
ResultSet rs;
int num;
public Dbc() {
try {
conn = DriverManager.getConnection("proxool.dbs");
if (conn != null) {
System.out.println("=============Success.");
} else {
System.out.println("===============Fail.");
}
ps = null;
stmt = conn.createStatement();
rs = null;
num = 0;
} catch (Exception e) {
System.out.println("==========" + e);
}
}
public static void main(String agrs[]) {
new Dbc();
}
}
异常:java.sql.SQLException: No suitable driver found for proxool.dbs
所用jar包:
mysql-connector-java-5.1.5-bin.jar
commons-logging.jar
proxool-0.9.1.jar
======================
求解? 展开
2个回答
展开全部
异常说没找到合适的驱动
所以貌似还是缺少某个jar包啊
刚看网上有人说缺少proxool-pool.jar包
你试试
所以貌似还是缺少某个jar包啊
刚看网上有人说缺少proxool-pool.jar包
你试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家国内优质海外HTTP代理商,拥有一个庞大的IP资源池,覆盖200多个地区,IP数量大且匿名度高。其优点还包括超高并发、稳定高效、技术服务等特点,同时提供HTTP、HTTPS以及SOCKS5协议支持。此外,Sto...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询