问题已经解决!http://www.hibernate.org.cn/viewtopic.php?t=11390

解决方案 »

  1.   

    2005-04-21 12:24:32,892 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from class path resource [applicationContext.xml]
    2005-04-21 12:24:36,157 [org.springframework.beans.factory.xml.XmlBeanFactory]-[INFO] Creating shared instance of singleton bean 'placeholderConfig'
    2005-04-21 12:24:36,447 [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]-[INFO] Loading properties from class path resource [init.properties]
    2005-04-21 12:24:36,467 [org.springframework.beans.factory.xml.XmlBeanFactory]-[INFO] Creating shared instance of singleton bean 'mySessionFactory'
    2005-04-21 12:24:36,678 [org.springframework.beans.factory.xml.XmlBeanFactory]-[INFO] Creating shared instance of singleton bean 'dataSource'
    2005-04-21 12:24:36,888 [net.sf.hibernate.cfg.Environment]-[INFO] Hibernate 2.1.2
    2005-04-21 12:24:36,898 [net.sf.hibernate.cfg.Environment]-[INFO] hibernate.properties not found
    2005-04-21 12:24:36,908 [net.sf.hibernate.cfg.Environment]-[INFO] using CGLIB reflection optimizer
    2005-04-21 12:24:37,939 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping class: com.panchina.acl.bean.UserVO -> user
    2005-04-21 12:24:38,240 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping collection: com.panchina.acl.bean.UserVO.userInfo -> userInfo
    2005-04-21 12:24:38,270 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping collection: com.panchina.acl.bean.UserVO.groups -> GURelation
    2005-04-21 12:24:38,460 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping class: com.panchina.acl.bean.GroupVO -> group
    2005-04-21 12:24:38,460 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping collection: com.panchina.acl.bean.GroupVO.users -> GURelation
    2005-04-21 12:24:38,630 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping class: com.panchina.acl.bean.ModuleVO -> module
    2005-04-21 12:24:38,640 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping collection: com.panchina.acl.bean.ModuleVO.rightNames -> MPRelation
    2005-04-21 12:24:38,791 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping class: com.panchina.acl.bean.UserPermissionVO -> UserPermission
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.MappingException: Could not interpret type: String
    2005-04-21 12:24:38,961 [net.sf.hibernate.cfg.Binder]-[INFO] Mapping class: com.panchina.acl.bean.GroupPermissionVO -> GroupPermission
    2005-04-21 12:24:38,971 [org.springframework.orm.hibernate.LocalSessionFactoryBean]-[INFO] Building new Hibernate SessionFactory
    2005-04-21 12:24:38,971 [net.sf.hibernate.cfg.Configuration]-[INFO] processing one-to-many association mappings
    net.sf.hibernate.MappingException: Could not interpret type: String
    at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:910)
    at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:411)
    at net.sf.hibernate.cfg.Binder.bindCollectionSecondPass(Binder.java:1181)
    at net.sf.hibernate.cfg.Binder.bindMapSecondPass(Binder.java:1106)
    at net.sf.hibernate.cfg.Binder$MapSecondPass.secondPass(Binder.java:1372)
    at net.sf.hibernate.cfg.Binder$SecondPass.doSecondPass(Binder.java:1328)
    at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:600)
    at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:743)
    at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:436)
    at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:374)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
    at com.panchina.test.Test.main(Test.java:19)
      

  2.   

    看异常应该是你的child的hbm文件写错了.贴出来看看.