hibernate框架搭建出现的bug

来源:互联网 发布:宁波新房成交数据 编辑:程序博客网 时间:2024/06/08 07:44

Hibernate 在添加数据库的时候出现错误,设置了断点并debug的时候发现以下错误提示:

The JAR of this class file belongs tocontainer 'JUnit 4' which does not allow modifications to source attachments on its entries.(这类文件的JAR属于容器的JUnit 4”不允许修改其条目来源的附件。)

 

参考以下文章:

http://www.crifan.com/android_adt_the_jar_of_this_class_file_belongs_to_container_android_dependencies_which_does_not_allow_modifications_to_source_attachments_on_its_entries/

 

http://www.360doc.com/content/14/0614/15/2613145_386555194.shtml

 

 

具体解决方案如下:

在调试期间,即Debug视图下,

右击那个Debug的Tab中的当前的Thread

Edit SourceLookup->Default->Add->Java Project->选择你的jar所对应的源码所在的项目->OK->OK

再继续debug或者是重新debug,即可实现:F5可以进入对应的源码,进行源码调试了。

 

这是修改完成后的:

 

再继续debug或者是重新debug,即可实现:F5可以进入对应的源码,进行源码调试了。依次查看是否可以看到源代码,如果可以那么就继续,否则,debug。

又出现了bug如下:

 

 

the source attachment does not contain thesource for the file nativeMethodAccessorlmpl.class

 

源附件不包含文件nativemethodaccessorlmpl.class源

 

Source Not found。 不是错误。而是你在工程里设置了调试断点,所以自动进入调试模式,然后IDE开始寻找源码。找不到源码,就会出现上述界面。 

解决方法: 

去除所有的断点。 

Window->Open Perspective->Debug默认是右上角的窗口中,切换到Breakpoints, 

里边的内容,就是你设置的断点,将其全部取消即可。

 

0 0
原创粉丝点击