首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.lang.NoClassDefFoundError: org.hibernate.cfg.Configuration解决方法!

2014-01-26 
?xml version 1.0 encoding UTF-8 ? beans xmlns http://www.springframework.org/schema/bean

<?xml version= "1.0 " encoding= "UTF-8 "?>
<beans xmlns= "http://www.springframework.org/schema/beans "
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "
xsi:schemaLocation= "http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd ">

<bean name= "/empLogin " class= "EmployeeLoginAction ">
<property name= "empMgr " ref= "EmployeeManagerService "/>
</bean>

<bean id= "EmployeeManagerService " class= "EmployeeManagerServiceImpl ">

<property name= "employeeDAO " ref= "EmployeeDAO "/>

</bean>

<bean id= "EmployeeDAO " class= "EmployeeDAOHibernate " lazy-init= "true ">
property name= "employeeDAO " ref= "EmployeeDAO "/
</bean>

<bean id= "dataSource "
class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
<property name= "driverClassName "
  value= "oracle.jdbc.driver.OracleDriver "/>
<property name= "url "
  value= "jdbc:oracle:thin:@localhost:1521:sammi "/>
<property name= "username " value= "system "/>
<property name= "password " value= "sammi "/>
</bean>

<bean id= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean "
destroy-method= "close ">

<property name= "configLocation ">
<value> hibernate.cfg.xml </value>
</property>

<property name= "dataSource " ref= "dataSource "/>
<property name= "mappingResources ">
<list>
  <value> Employee.hbm.xml </value>
</list>
</property>
<property name= "hibernateProperties ">
<props>
  <prop key= "hibernate.dialect ">
  org.hibernate.dialect.Oracle9Dialect
  </prop>
</props>
</property>         

热点排行