我的配置文件:<?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>

解决方案 »

  1.   

    这不是很明显缺少包嘛!
    va.lang.NoClassDefFoundError: org/objectweb/asm/Type
    你找一下asm.jar这个包,名字或者相近,版本不一样
      

  2.   

    楼上说的很对,你的缺少lib包
      

  3.   

    2006-02-24 08:41:32,890 ERROR [org.hibernate.util.DTDEntityResolver] - Don't use old DTDs, read the Hibernate 3.x Migration Guide!不要用旧的DTD,我想你的xml是从Hibernate2上面拿过来的。
    你应该找一个Hibernate 3.x 的xml文件来改改就行了。
      

  4.   

    不是!上面的那个问题是版本不对改成
    <!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
    这个问题
      

  5.   

    请问HIBERNETE的连接方法和JDBC的连接方法一样吗?我上面填的那些连接信息正确吗?
      

  6.   

    IOException parsing XML 这个问题还是跟DTD有关的,你的电脑没有办法连接到
    http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
    你现在IE上试试这个url,看看能不能看到这个dtd网上有篇文章,你可以参考一下
    http://www.almaer.com/blog/archives/001000.html
      

  7.   

    请问HIBERNETE的连接方法和JDBC的连接方法一样吗?我上面填的那些连接信息正确吗?
      

  8.   

    java.net.ConnectException: Connection timed out: connect
    这是因为你网络断开,applicationContext.xml 连接不到"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd",不能做dtd应证~把这文件放到你本机,然后在eclipse里面配置一下就不会了.... 
      

  9.   

    楼上的!请将具体点,如何在ECLIPSE里配置呢?谢谢!