出错了,帮我看看 Cannot create JDBC driver of class '' for connect URL 'null' 你的配置呢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 cn.somsoft.myznt.dao.impl.IUserDAOImpl.register(IUserDAOImpl.java:12)这里出错了,贴代码 连接池配置 <Context path="/abc" docBase="D:\Program Files\Tomcat 5.5\webapps\abc" debug="5" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_MysqlTest_log." suffix=".txt" timestamp="true"/> <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/mysql"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <parameter> <name>maxActive</name> <value>100</value> </parameter> <parameter> <name>maxIdle</name> <value>30</value> </parameter> <parameter> <name>maxWait</name> <value>5000</value> </parameter> <parameter> <name>username</name> <value>root</value> </parameter> <parameter> <name>password</name> <value>hj</value> </parameter> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/mldn</value> </parameter> </ResourceParams> org.hibernate.exception.GenericJDBCException: Cannot open connection 数据库连接的有问题 applicationContext.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans> <bean id="DataaSource" class="org.springframework.jndi.JndiObjectFactoryBean" destroy-method="close"> <property name="jndiName" value="java:comp/env/jdbc/mysql"></property> </bean> <bean id="sessionFactorys" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="DataaSource" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> <!--用户配置第2步 ↓--> <!-- 表示允许自动提交 --> <prop key="hibernate.connection.autocommit">true</prop> <!-- 显示sql语句 --> <prop key="hibernate.show_sql">true</prop> <!--用户配置第2步 ↑--> </props> </property> <property name="mappingResources"> <list> <value>cn/somsoft/myznt/vo/User.hbm.xml</value> </list> </property> </bean> <!--用户配置第1步 连接工厂 ↓--> <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> <property name="sessionFactory"> <ref bean="sessionFactorys" /> </property> </bean> <!--用户配置第1步 连接工厂 ↑--> <!--用户配置第7步 ↓--> <bean id="iuserdao" class="cn.somsoft.myznt.dao.IUserDAO" abstract="true"> </bean> <bean id="iuserdaoimpl" class="cn.somsoft.myznt.dao.impl.IUserDAOImpl" parent="iuserdao"> <property name="hibernateTemplate"> <ref bean="hibernateTemplate" /> </property> </bean> <!--用户配置第7步 ↑--> <!--用户配置第8步 Struts 操作引用 ↓--> <bean name="/jsp/user" class="cn.somsoft.myznt.struts.action.UserAction"> <property name="iuserdao"> <ref bean="iuserdaoimpl"/> </property> </bean> <!--用户配置第8步 ↑--></beans> 我是看着李兴华的教程做的就是那个SSH的我的智囊团 http://topic.csdn.net/u/20080619/18/cddeb641-d8ef-4ecb-939e-c7efb8943f3e.html看下这贴有没有帮助 java.lang.IllegalArgumentException: dom4j-core,jdom,xml-apis,xerces,junit-Extens 求助。。。java短信开发程序找不到串口信息 好奇怪的问题 郑州java程序员求职,有没有在郑州的朋友帮我一把 自定义标签问题 判断验证码输入是否正确?? 关于stateless Session Bean的class variable 有关entity EJB的问题 用JAVA编写模拟qq农场,前辈们可否帮助我一下 webservice 如何存储ManyToMany关系的EntityBean struts中验证问题
debug="5" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_MysqlTest_log." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mysql">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value>hj</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/mldn</value>
</parameter>
</ResourceParams>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans>
<bean id="DataaSource"
class="org.springframework.jndi.JndiObjectFactoryBean" destroy-method="close">
<property name="jndiName" value="java:comp/env/jdbc/mysql"></property>
</bean>
<bean id="sessionFactorys"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="DataaSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<!--用户配置第2步 ↓-->
<!-- 表示允许自动提交 -->
<prop key="hibernate.connection.autocommit">true</prop>
<!-- 显示sql语句 -->
<prop key="hibernate.show_sql">true</prop>
<!--用户配置第2步 ↑-->
</props>
</property>
<property name="mappingResources">
<list>
<value>cn/somsoft/myznt/vo/User.hbm.xml</value>
</list>
</property>
</bean>
<!--用户配置第1步 连接工厂 ↓-->
<bean id="hibernateTemplate"
class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactorys" />
</property>
</bean>
<!--用户配置第1步 连接工厂 ↑--> <!--用户配置第7步 ↓-->
<bean id="iuserdao" class="cn.somsoft.myznt.dao.IUserDAO"
abstract="true">
</bean>
<bean id="iuserdaoimpl"
class="cn.somsoft.myznt.dao.impl.IUserDAOImpl" parent="iuserdao">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate" />
</property>
</bean>
<!--用户配置第7步 ↑-->
<!--用户配置第8步 Struts 操作引用 ↓-->
<bean name="/jsp/user" class="cn.somsoft.myznt.struts.action.UserAction">
<property name="iuserdao">
<ref bean="iuserdaoimpl"/>
</property>
</bean>
<!--用户配置第8步 ↑-->
</beans>
看下这贴有没有帮助