java.io.ObjectInputStream类型无法解析。它是从所需的.class文件间接引用的 [英] The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

查看:4871
本文介绍了java.io.ObjectInputStream类型无法解析。它是从所需的.class文件间接引用的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了Eclipse,并尝试创建一个示例的servlet程序,但是我遇到以下错误

I have downloaded Eclipse and tried to create a sample servlet program but I got following error


类型java.io.ObjectInputStream不能得到解决它是从必需的.class文件间接引用的。

The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

我已经正确配置了构建路径。
我正在使用Java 8和Apache Tomcat 7,两者的库都被正确引用。

I have configured build path correctly. I am using Java 8 and Apache Tomcat 7 and libraries for both are referenced correctly.

问题是专门针对Java EE的。通常Java SE项目运行正常。

Problem is specifically for Java EE only. Ordinarily Java SE projects are running fine.

推荐答案

在Java 8 Update 91中发生了破坏现有JSP代码的事情。这似乎很清楚以下是类似问题和错误报告的示例:

Something happened in Java 8 Update 91 that broke existing JSP code. That seems pretty clear. Here is a sample of similar questions and bug reports:

  • Unable to compile JSP file with JDK1.8.0_92
  • Spring MVC - Unable to compile class for JSP
  • Unable to access CloudPlatform Client
  • https://bugs.openjdk.java.net/browse/JDK-8155588 (closed as "not an issue")
  • https://bugs.openjdk.java.net/browse/JDK-8155223 (closed as "not an issue")
  • https://access.redhat.com/solutions/2294701
  • https://alluxio.atlassian.net/browse/ALLUXIO-1956
  • https://jira.atlassian.com/browse/CWD-4729
  • https://community.exoplatform.com/portal/intranet/forum/topic/topic991e097d9e45345236bb2bd1920a4c68
  • https://issues.apache.org/jira/browse/OOZIE-2533 (from a comment: "This is really looking like a JDK bug")
  • https://bugzilla.redhat.com/show_bug.cgi?id=1337940 (comment 2 mentions the change to java.io.ObjectInputStream in Update 91 that "made it incompatible with RHEL6's current ECJ version")
  • https://github.com/mit-cml/appinventor-sources/issues/814
  • https://community.oracle.com/thread/3953395

所有这些都是关于Java 8 Update 91(或更高版本)在使用早期版本时不存在的问题JRE / JDK版本。

All these are about problems with Java 8 Update 91 (or later) that are not present when using earlier JRE/JDK versions.

从2016年1月22日起,以下OpenJDK变更集似乎相关: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/32f64c19b5fb (提交消息8144430:改进JMX连接)。该变更集似乎与此漏洞有关, https: //cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3427 ,这是在对这个红帽错误报告的评论中提到的, https://bugzilla.redhat.com/show_bug.cgi?id=1336481

The following OpenJDK changeset from 22 January 2016 appears to be related: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/32f64c19b5fb (commit message "8144430: Improve JMX connections"). The changeset seems to be related to this vulnerability, https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3427, which is mentioned in a comment to this Red Hat bug report, https://bugzilla.redhat.com/show_bug.cgi?id=1336481.

更新91发行说明文件提到JDK-8144430(非公开机票): http://www.oracle.com/technetwork/java/javase/8u91-relnotes-2949462.html

The Update 91 release notes document mentions JDK-8144430 (non-public ticket): http://www.oracle.com/technetwork/java/javase/8u91-relnotes-2949462.html.

在Oracle重要补丁更新咨询 - 2016年4月中,提到了CVE-2016-3427漏洞: http://www.oracle.com/technetwork/security-advisory/cpua pr2016v3-2985753.html

In "Oracle Critical Patch Update Advisory - April 2016", the CVE-2016-3427 vulnerability is mentioned: http://www.oracle.com/technetwork/security-advisory/cpuapr2016v3-2985753.html.

这篇关于java.io.ObjectInputStream类型无法解析。它是从所需的.class文件间接引用的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆