问题:
Could not determine type for: String, for columns: [org.hibernate.mapping.Column(FeeTime)]
报错如下:
严重: 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 ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(FeeTime)]
Caused by: org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(FeeTime)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:804)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:744)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
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:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
解决方法:
type指的是hibernate中的类型,不是java中的String类型,必须小写,
<property column="FeeTime" length="8" name="feeTime" not-null="true" type="String"/>
上面是错误的.下面是正确的.
<property column="FeeTime" length="8" name="feeTime" not-null="true" type="string"/>
分享到:
相关推荐
Android Studio更新3.6.3之后出现Could not resolve all artifacts for configuration ‘:classpath’.问题你是否和我一样,只因在人群中多看了他一眼?![在这里插入图片描述]...
Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant:’ 解决方法: 确保在build.gradle文件中设置了applicationId ...
本篇文章给大家分享了Android Studio中导出数据库文件的方法以及出现Failed to pull selection: open failed: Permission denied的解决思路,有兴趣的学习下。
引入摄像头(uvccamera),在github下载资源common的时候一直下载不下来说是连接不上网络问题
2. `icudt68.dll`、`icuin68.dll`和`icuuc68.dll`:这些是国际部件库(ICU,International Components for Unicode)的动态链接库,用于支持PHP中的国际化和本地化功能,如日期和时间格式,货币符号等。这里的68代表...
标题“Determine Drive Type”指的是在计算机编程中识别或判断磁盘驱动器类型的技能。这通常涉及到使用操作系统提供的API函数或者编程语言中的特定库来获取有关驱动器的信息。在这个场景中,标签“另类其它”可能...
【标题】"FlippableStackView.zip"是一个包含Android开发相关源码的压缩包,主要涉及一个名为"FlippableStackView"的自定义视图组件。这个组件可能用于实现卡片堆叠翻转效果,常见于各种应用的交互设计中,如应用...
Stetho是一个强大的Android调试库,由Facebook开发并开源,它允许开发者在Chrome浏览器中对Android应用进行深度的网络检测、查看数据库以及检查Shared Preferences(SP)。这个工具极大地简化了开发者在开发过程中对...
Oracle Application Express Installation Guide For Oracle Database 12
错误日志如下: 5-31 12:47:40.088 ... W/System.err: java.lang.UnsatisfiedLinkError: Native method not found: cn.jiguang.service.Protocol.GetSdkVersion:()I 05-31 12:47:40.088 23896-23896/? W/System.err
// Probably need to make sure we are not allocating objects (strings, etc.) in loops public class MyGallery extends FrameLayout { // Constants private final int swipe_min_distance = 120; private...
在C++编程中,"determine" 这个任务通常涉及到对文件内容的读取以及字符串处理。在这个场景中,我们需要实现一个功能:检查文件中的字符串是否包含特定的符号,并根据找到的符号输出对应的值(正1或负1)。下面我们...
在Android开发过程中,Android Studio是首选的集成开发环境(IDE),但有时会遇到各种问题,如本文提到的“Android Studio default not found”错误。这个错误通常发生在尝试编译或同步Gradle项目时,提示...
《OpenCV在计算机视觉中的应用——以Ubuntu noetic版本为例》 OpenCV(开源计算机视觉库)是一个强大的跨平台库,用于处理图像和视频数据,广泛应用于机器学习、深度学习、计算机视觉等领域。"vision_opencv-noetic...
集成方式 implementation ...build.gradle加入 allprojects { repositories { jcenter() ... } } ...PictureSelector适配已经做的很好了,功能齐全,且兼容性好 ...4.动态获取系统
**adb(Android Debug Bridge)是Android开发者不可或缺的工具之一,它是Android SDK Platform-Tools 23中的核心组件。本文将深入探讨adb的功能、用途以及如何在Android开发和调试过程中使用它。...
- 0000720: Tag property for DBGrid Columns - 0000723: DBGrid: numeric column is not aligned to right - 0000722: Setting Align := alCenter on DBGridColumns does not work - 0000715: OmniHTTPD and ...
out_box_demo
标题 "The skin does not exist: Unable to determine the release version" 提到的问题,通常是与软件部署或更新时出现的错误有关,尤其是与版本控制或者界面显示有关。这可能是指在使用某些开源工具或框架时,系统...