我的配置文件:<?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="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=finance</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
<property name="maxActive">
<value>25</value>
</property>
<property name="maxWait">
<value>10000</value>
</property>
<property name="maxIdle">
<value>10</value>
</property>
<property name="minIdle">
<value>5</value>
</property>
</bean> <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>/com/suntek/bean/VO/other/flow/model/Flow.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="show_sql">false</prop>
<prop key="hibernate.connection.useUnicode">true</prop>
<prop key="hibernate.connection.characterEncoding">
UTF-8
</prop>
</props>
</property>
</bean> <bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="iFlow"
class="com.suntek.bean.DAO.other.flow.FlowDao">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property> </bean></beans>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd"><beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=finance</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
<property name="maxActive">
<value>25</value>
</property>
<property name="maxWait">
<value>10000</value>
</property>
<property name="maxIdle">
<value>10</value>
</property>
<property name="minIdle">
<value>5</value>
</property>
</bean> <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>/com/suntek/bean/VO/other/flow/model/Flow.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="show_sql">false</prop>
<prop key="hibernate.connection.useUnicode">true</prop>
<prop key="hibernate.connection.characterEncoding">
UTF-8
</prop>
</props>
</property>
</bean> <bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="iFlow"
class="com.suntek.bean.DAO.other.flow.FlowDao">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property> </bean></beans>
解决方案 »
- SSH整合错误问题
- 菜鸟 关于并发性问题
- STRUTS2参数传递
- 如果使用Servlet的Filter过滤数据库中非法字符?
- struts2.0 、spring、hibernate集成的步骤及注意事项
- could not find the main class,program will exit
- 我想用struts+ibatis+spring做设备管理,谁有好的例子
- web services查询数据库,怎么将该数据集回传客户端?(客户端为.net C#)
- 大家说说Hibernate持久化对象的优势!
- Struts模板的难处
- 大家好,请教一个关于版本升级的问题!
- java里有什么好的开源安全框架?
va.lang.NoClassDefFoundError: org/objectweb/asm/Type
你找一下asm.jar这个包,名字或者相近,版本不一样
你应该找一个Hibernate 3.x 的xml文件来改改就行了。
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
就行了,现在又出现了
2006-02-24 09:32:34,328 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml
eption: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect
这个问题
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
你现在IE上试试这个url,看看能不能看到这个dtd网上有篇文章,你可以参考一下
http://www.almaer.com/blog/archives/001000.html
这是因为你网络断开,applicationContext.xml 连接不到"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd",不能做dtd应证~把这文件放到你本机,然后在eclipse里面配置一下就不会了....