`

Association references unmapped class: Babys

    博客分类:
  • bug
阅读更多
2014-4-28 9:25:54 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\Tomcat6.0\webapps\school\WEB-INF\classes\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: Babys
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.hibernate.MappingException: Association references unmapped class: Babys
	at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380)
	at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2662)
	at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
	at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:673)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	... 39 more
2014-4-28 9:25:54 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2014-4-28 9:25:54 org.apache.catalina.core.StandardContext start
严重: Context [/school] startup failed due to previous errors
2014-4-28 9:25:54 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext


解决办法:错误原因是实体类对应的映射文件中的映射关系(one-to-many....)中的class错了将one-to-many中的class=包名+类名,写完整就可以了
分享到:
评论

相关推荐

    demo-ts-references-monorepo:打字稿参考例monorepo

    TypeScript项目参考示例Monorepo 本示例说明如何使用以下工具使用自动发布,变更日志,测试等配置项目: 语言-具有TSC的(不是 ) CI- 版本控制/发布- Mono仓库管理- 程序包设置 测试-与 - 或任何捆绑器( ,......

    maximo数据字典

    4. **List of references**:列举了各个表之间的引用关系,即主键与外键之间的关联。 #### 三、具体组件 Maximo 数据字典详细划分了不同的功能模块,下面列举了一些重要的组件及其内容: 1. **PackageAssets**: ...

    research-references-bot:使用Python在Telegram上创建搜索引擎Bot

    参考研究机器人该项目将使用TF IDF和余弦相似度在电报上创建搜索引擎机器人。入门这些说明将为您提供在本地计算机上运行并运行的项目的副本,以进行开发和测试。 有关如何在实时系统上部署项目的注释,请参阅部署。...

    C# 读取DXF全套实例 图形输出 控制台输出 dxf全部信息

    C# 读取DXF全套实例 图形输出 控制台输出 dxf全部信息 FILE NAME: sample.dxf ... References count: 15 ACAD_PSEXT; References count: 2 AcadAnnoPO; References count: 0 AcadAnnotative; Ref

    Big.Data.and.IT.Professionals.1514870622

    Big Data and IT Professionals: A Study of the Perceptions Held by IT Professionals in Relation to the Maturity, Value, and Practical Deployment of Big Data ...Appendix A: References Appendix B: Survey

    Hibernate Reference Documentation3.1

    16.2. Alias and property references 16.3. Named SQL queries 16.3.1. Using return-property to explicitly specify column/alias names 16.3.2. Using stored procedures for querying 16.3.2.1. Rules/...

    Asset Cleaner PRO - Clean - Find References

    Feature 1 - Project Cleaner: 1、Actions for unused files ...Feature 2 - Find References: 1、Find references, usages, relationships easily in Project or Scene 2、Explore usages & references

    classfile_constants_java_

    2. **类和接口的符号引用(Class and Interface References)**:如 `CONSTANT_Class_info`,表示类或接口的全限定名。例如,`com/example/MyClass`。 3. **字段符号引用(Field References)**:`CONSTANT_...

    references.zip

    references/detection/engine.py , references/detection/utils.py 和 references/ detection/transforms.py

    update-ts-references:使用TypeScript的多包存储库的帮助程序

    npx update-ts-references --help Usage: update-ts-references [options] Options: --check Checks if updates would be necessary (without applying them) --help Show help --cwd Set working directory. ...

    谷歌师兄的leetcode刷题笔记-References::green_book:一个收集所有参考资料的地方

    谷歌师兄的leetcode刷题笔记参考 :blue_book: Google 的 TensorFlow Lite 是世界上最受欢迎的机器学习框架之一的小兄弟,它专注于这一点——在资源受限的设备上运行神经网络推理 :blue_book: 能够模拟 ...

    Comcast NGOD的媒体资产管理子框架

    - **Informative References**:提供额外信息和背景资料的非强制性参考。 4. **Terms and Definitions**: 定义了用于描述系统和过程的关键术语,确保所有参与者对概念有统一的理解。 5. **Abbreviations and ...

    style_references.rar_style

    "style_references.rar_style"这个标题可能是指一个关于编程风格参考的压缩包,其中包含了对特定编程语言或框架的样式指南引用。这种参考资料对于开发者来说是至关重要的,因为它提供了编写整洁、一致代码的标准。 ...

    Python库 | wagtail_references-0.0.2.tar.gz

    《Python库 wagtail_references-0.0.2详解》 在Python编程领域,库的使用是提高开发效率和代码质量的重要手段。今天我们要探讨的是一个名为`wagtail_references`的Python库,版本号为0.0.2,它封装了一些特定的功能...

    matlab正弦函数程序代码-Reservoir-computing:在可重新编程的模拟硬件上实现Echo状态网络

    matlab正弦函数程序代码-Reservoir_computing:在可重新编程的模拟硬件上实现Echo状态网络来模拟深度学习...matlab正弦函数程序代码水库计算项目Thia-Thiong-Fat、YassineKamri该存储库展示了我们...references-papers:

    matlab正弦函数程序代码-Reservoir-computing:在可重新编程的模拟硬件上实现Echo状态网络来模拟深度学习

    matlab正弦函数程序代码-Reservoir_computing:在可重新编程的模拟硬件上实现Echo状态网络来模拟深度学习..matlab正弦函数程序代码水库计算项目Thia-Thiong-Fat、YassineKamri该存储库展示了...references-papers:我

    Python库 | pelican_references-0.2.3-py3-none-any.whl

    Python库pelican_references是一个用于处理和管理参考文献的工具,主要面向使用Pelican生成静态博客或网站的开发者。Pelican是Python编写的一款流行的静态站点生成器,它允许用户使用Markdown或reStructuredText格式...

Global site tag (gtag.js) - Google Analytics