在我的工程里加了个train-hibernate.hbm.xml文件,就报错,不加这个文件正常运行,就是工程里本身还有其他的...hibernate.hbm.xml文件,可以运行,并且也自动生成数据库表,就一加train这个文件就报错:
[ERROR]2012-06-05 17:44:45,172 Context initialization failed - (org.springframework.web.context.ContextLoader:208) 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassAutoCloseJob' defined in file [C:\Users\fujin\Workspaces\MyEclipse\.metadata\.me_tcat\webapps\ROOT\WEB-INF\classes\applicationContext-scheduler.xml]: Cannot resolve reference to bean 'clazzServiceImpl' while setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clazzServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.flare.college.dao.ClazzDAO com.flare.college.service.impl.ClazzServiceImpl.clazzDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clazzDAOImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [C:\Users\fujin\Workspaces\MyEclipse\.metadata\.me_tcat\webapps\ROOT\WEB-INF\classes\applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\fujin\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;C:\Users\fujin\AppData\Local\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.5.0.zmyeclipse75020090612\tomcat\bin
什么原因呀??我的train表自动生成不了了。

解决方案 »

  1.   

    你可以对train-hibernate.hbm.xml中的文件字段以及关联关系,进行逐行删除,然后spring juit进行启动测试,就能明确问题出在那儿了...
      

  2.   

     Error creating bean with name 'clazzDAOImpl'
    检查检查 这个bEAN
      

  3.   

    好像是因为你的clazzDAOImpl,clazzServiceImpl,这个没有在spring的配置里面进行注入配置吧,你看看是不是这个原因