首页 \ 问答 \ 在eclipse上使用Hibernate时出错(Error using Hibernate on eclipse)

在eclipse上使用Hibernate时出错(Error using Hibernate on eclipse)

我开始学习如何使用hibernate。 当出现此错误时,我正在创建我的新应用程序

mar 13, 2015 5:05:06 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
mar 13, 2015 5:05:06 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.8.Final}
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: ./hibernate.cfg.xml
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: ./hibernate.cfg.xml
mar 13, 2015 5:05:06 PM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: sample/Event.hbm.xml
Ocurrió un error en la inicialización de la SessionFactory: org.hibernate.MappingNotFoundException: resource: sample/Event.hbm.xml not found
Exception in thread "main" java.lang.NullPointerException
at samples.ContactosDAO.guardaContacto(ContactosDAO.java:31)
at samples.main.main(main.java:18)   

我真的迷失在这里。 请有人帮帮我


I'm starting to learn how to use hibernate. I was creating my new application when this error showed up

mar 13, 2015 5:05:06 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
mar 13, 2015 5:05:06 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.8.Final}
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: ./hibernate.cfg.xml
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: ./hibernate.cfg.xml
mar 13, 2015 5:05:06 PM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
mar 13, 2015 5:05:06 PM org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: sample/Event.hbm.xml
Ocurrió un error en la inicialización de la SessionFactory: org.hibernate.MappingNotFoundException: resource: sample/Event.hbm.xml not found
Exception in thread "main" java.lang.NullPointerException
at samples.ContactosDAO.guardaContacto(ContactosDAO.java:31)
at samples.main.main(main.java:18)   

I'm really lost in here. Can someone help me out please


原文:https://stackoverflow.com/questions/29042504
更新时间:2023-09-21 16:09

最满意答案

问题似乎与附加的调试器有关,每当我运行附带调试器的程序时我会得到奇怪和无法解释的延迟,当我运行程序独立作为一个excecutable我没有得到任何延迟。


The problem seem to have somthing to do with the attached debugger, whenever i run the program with the debugger attached i get strange and unexplained delays, when i run the program stand alone as an excecutable i get no delays what so ever.

相关问答

更多
  • 为了设置背景,我已经向App Store编写并提交了2个成功的应用程序,因此您知道我不是在假设。 回过头来,您可以将下载推送到后台线程,并以滑块的形式更新进度(为了用户的利益)。 但是,如果在这种情况下用户无论如何都无法做任何事情那么就没有意义了。 另外,我不认为Apple会拒绝你的应用程序。 他们检查的主要内容之一是,如果您使用任何私有API或更基本的应用程序崩溃。 所以请继续提交APP商店评论...... Just to set the background, I have written & subm ...
  • 检查JSON。 它兼容多种语言(包括Python和Java),并且它是人类可读的。 http://www.json.org/ 如果你打算做Web开发,并计划使用Javascript,那么JSON可能是一个不错的选择,因为它最初是为Javascript设计的。 此外,与YAML相比,在Python中使用JSON与写入一样简单: import json (它是标准库的一部分)。 你可以看看下面的页面 ,比较XML,JSON和YAML。 看起来它们在编码延迟和内存使用方面存在差异,这可能会指导您的选择。 Chec ...
  • 很可能您系统上的OpenSSL动态库与Qt构建的动态库不兼容。 您使用的Qt版本是什么? 由于您尚未指定操作系统,因此很难判断这是否是因为系统本身提供了OpenSSL的旧版本,但我建议使用任何可用的转储工具在OpenSSL库中查找符号(例如SSL_get0_next_proto_negotiated)如果他们不在那里 - 要么降级Qt,要么升级OpenSSL。 如上所述 - 从Qt 5.2及以上版本至少需要OpenSSL 1.0.0,旧版本可能会失败。 UPDATE 我怀疑你为SSL获得的错误确实是由于Op ...
  • 问题似乎与附加的调试器有关,每当我运行附带调试器的程序时我会得到奇怪和无法解释的延迟,当我运行程序独立作为一个excecutable我没有得到任何延迟。 The problem seem to have somthing to do with the attached debugger, whenever i run the program with the debugger attached i get strange and unexplained delays, when i run the prog ...
  • 在http://tutorials.jenkov.com/java-nio/datagram-channel.html的帮助下,找到了如何使用DatagramChannel 。 以下是代码。 import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; import java.nio.charset.StandardCharsets; public class ReaderThread extends Thread { ...
  • 您只需将SOAP客户端配置为使用Compute Engine实例的公共IP(当我希望您拥有SOAP端点时)。 请记住,不可能从appengine到计算引擎创建一种“私有网络”,因此需要从“Internet”访问计算引擎实例,并且您必须验证请求。 Simply you can configure your SOAP client to use the public IP of you Compute Engine instance(when I hope you have a SOAP endpoint). ...
  • 是。 您链接到的页面可在同一网络上的手机和桌面应用之间使用。 你提出的引用说WP只有一种功能可以覆盖所有网络访问,而不是将不同的网络访问类型分成不同的功能。 这并不意味着其他功能背后的功能不存在。 Yes. The page you link to will work between a phone and a desktop app on the same network. The quote you pull out says that WP has just one capability to cov ...
  • 如果内置类型不能满足您的需求,您是否听说过Mockets ? 您可能需要联系那里的人以获取更多信息,但它基本上表现为TCP可靠性,但是通过UDP运行。 另外,您需要使用套接字的原因是什么? 如果你真的没有严格的要求,那么使用消息队列怎么样? 您将获得异步消息传递,应用程序生存期间的消息持久性,并且它在2.0中工作。 编辑:我看到这个其他职位关于从您自己的安装程序安装MSMQ。 If the built-in types don't work for your needs, have you heard of ...
  • 它可以但主要的警告: 首先,系统将取消注册您可能已建立的任何Bonjour名称。 其次,如果你被绑定到WWAN,即使你在监听它也会失败(即使在前台也是如此)。 第三,如果您的应用程序在后台没有执行任何其他操作(即,未注册以提供背景音乐,位置事件或电话),您仍必须在后台任务完成的时间限制内关闭或终止。 所以,虽然你可以在后台绑定和监听套接字,但几乎所有实际用途都不值得做,你应该重新考虑你的设计。 It can but with major caveats: First, the system will unr ...
  • 我今天早上才回答:-) 链接答案(它谈到php-fpm和nginx,但当然apache的概念是相同的): https : //stackoverflow.com/a/19997381/227887 简而言之,您希望使用容器链接,这是0.6.5中允许将端口从容器暴露给另一个容器的新功能。 另请参阅官方docker文档: http : //docs.docker.io/en/latest/examples/linking_into_redis/ I just answered that this morning ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。