部署hibernate框架项目时出现问题:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files.
基本情况: (这些其实关系不大)
我是直接impor导入HibernateDemo项目到eclipse中的,
该项目的hibernate版本是3.6.7.Final版,使用了Hibernate Tools插件(我的是在线安装的最新版),MySql驱动按照步骤正常部署进去,不过由于jdbc的版本不同,我给把原来lib文件夹的jar包删了用了自己的。
出现问题:
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
意思大概是说:间接引用的Java类库是没有用的。
截图:鼠标点到红叉的地方会出现错误提示。

发现原因:在上图的项目结构里发现缺少了jre包,在第下图的环境里找到jre包,但是该包unbound未绑定。这说明java的类库并没有被真正的导入。

我的解决方法:在上图里,双击JRE System Library [ jdk1.7.0_01 ](unbound),选择WorkSpace default JRE(jdk7),finish。
结果如图:

部署hibernate框架项目时出现问题:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files.的更多相关文章
- 当你在web项目下新建一个class时package位置如果发生红色波浪错误,提示为”The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files“
问题是这样的如下图: 问题的原因: 1.配置tomcat7.0的时候自己设置了jre的版本1.8,而没有用myeclipse10自带的jre1.6,导致了出现了差错!
- VSCode部署JAVA项目出现The type java.lang.Object cannot be resolved
如题,出现的原因是这样的:我将mac系统上的eclipse项目复制到了ubuntu环境下,通过vscode的远程功能连接ubuntu. 然后项目上就出现了各种报错,显示The type java.la ...
- 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener【转】
部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...
- org.hibernate.validator.constraints.NotBlank' validating type 'java.lang.Integer
使用hibernate时,在save方法时,报了:org.hibernate.validator.constraints.NotBlank' validating type 'java.lang.In ...
- 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"
在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...
- 一个解决过程:Servlet [某路径xxx] in web application [/项目xxx] threw load() exception和java.lang.ClassNotFoundException XXX
Servlet [某路径xxx] in web application [/项目xxx] threw load() exception和java.lang.ClassNotFoundException ...
- 项目报错:Caused by: java.lang.ClassNotFoundException: Didn't find class "..."on path: DexPathList
项目报错: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.eshore.njb.MyApplicat ...
- 使用Hibernate框架技术时,对项目进行的配置
1.在需要使用Hibernate框架技术的项目上单击鼠标右键,在弹出的菜单中选择MyEclipse-->Add Hibernate Capabilities,打开Add Hibernate Ca ...
- SpringBoot启动项目时提示:Error:(3, 32) java: 程序包org.springframework.boot不存在
场景 在IDEA中新建SpringBoot项目,后启动项目时提示: Error:(3, 32) java: 程序包org.springframework.boot不存在 实现 将pom.xml中par ...
随机推荐
- 狗狗40题~ (Volume C)
A - Triangles 记忆化搜索呗.搜索以某三角形为顶的最大面积,注意边界情况. #include <stdio.h> #include <cstring> #inclu ...
- 思科27亿美元收购网络安全公司Sourcefire
据国外媒体报道,思科于今日宣布将以27亿美元的总价收购网络安全公司Sourcefire,以加强自身在网络安全业务领域的优势,该交易将于今年下半年完成. [IT商业新闻网讯](记者 张良)7月23日消息 ...
- Mysql中存储方式的区别
MySQL的表属性有:MyISAM 和 InnoDB 2种存储方式: MyISAM 不支持事务回滚 InnoDB 支持事务回滚 可以用 show create table tablename 命令看表 ...
- CSS 3层嵌套居中布局
<html> <head> <style type="text/css"> .root{ background-color: red; widt ...
- [POJ] 1948 Triangular Pastures (DP)
题目地址:http://poj.org/problem?id=1948 题目大意: 给N条边,把这些边组成一个三角形,问面积最大是多少?必须把所有边都用上. 解题思路: 根据题意周长c已知,求组合三边 ...
- CentOS下安装postgresql
一.说明 postgresql版本:9.4.1 安装包: postgresql94-server-9.4.1-1PGDG.rhel6.x86_64.rpm postgresql94-libs-9.4. ...
- 使用__autoload()来管理文件导入
其基本思想是把要使用到的其他资源文件统一使用__autoload()方法来管理,我们在使用的时候只需要引入包含__autoload()方法的文件即可.其对性能的影响是微乎其微的,但是带来的好处是巨大的 ...
- Leetcode:Largest Number详细题解
题目 Given a list of non negative integers, arrange them such that they form the largest number. For e ...
- cf500B New Year Permutation
B. New Year Permutation time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- JAVA 面试整理,面试汇总
1.JAVA是通过重写和重载来实现多态性的. 重写:同样的方法签名,不同的方法实现 重载:同样的方法名,不同的参数类型或参数个数 2.JAVA中如果存在不再使用的对象,但是程序又持有该对象的引用,就会 ...