IBM WAS Community Edition 8.5.5.0 java.lang.UnsupportedClassVersionError:JVMCFRE003坏主要版本

时间:2015-10-13 14:59:39

标签: web-applications java-7 websphere-8

我遇到一个问题,WAS给了我一个例外:

java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=test/xyz/abc/servlet/StartUp, offset=6

我已检查过该文件的编译版本,主要版本是51.根据我的研究,51是Java 7.

WAS安装了SDK 7,编译代码并使用JDK 7构建耳朵。但是我仍然收到此错误。无法看到可能出现的问题。想法?

.class文件的版本:

Classfile /C:/Workspaces/TESTEAR/TEST_compiled_withIBMSDK7/TEST-web/WEB-INF/classes/test/xyz/abc/servlet/StartUp.class
  Last modified Sep 29, 2015; size 3475 bytes
  MD5 checksum cae118ff68e60ac948b1ea68f9faae1a
  Compiled from "StartUp.java"
public class test.xyz.abc.servlet.StartUp extends javax.servlet.GenericServlet
  SourceFile: "StartUp.java"
  minor version: 0
  major version: 51
  flags: ACC_PUBLIC, ACC_SUPER

我已经在IBM WAS 8.5.5.0之上安装了IBM SDK 7,并且安装看起来很成功。

IBM安装详细信息:

WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time October 13, 2015 10:39:19 AM EDT

Installation
--------------------------------------------------------------------------------
Product Directory        C:\IBM\WebsphereAS
Version Directory        C:\IBM\WebsphereAS\properties\version
DTD Directory            C:\IBM\WebsphereAS\properties\version\dtd
Log Directory            C:\ProgramData\IBM\Installation Manager\logs

Product List
--------------------------------------------------------------------------------
IBMJAVA7                 installed
BASE                     installed

Installed Product
--------------------------------------------------------------------------------
Name                  IBM WebSphere SDK Java Technology Edition (Optional)
Version               7.0.9.10
ID                    IBMJAVA7
Build Level           cf071533.01
Build Date            8/20/15
Package               com.ibm.websphere.IBMJAVA.v70_7.0.9010.20150820_1342
Architecture          x86-64 (64 bit)
Installed Features    IBM WebSphere SDK for Java Technology Edition 7

Installed Product
--------------------------------------------------------------------------------
Name                  IBM WebSphere Application Server
Version               8.5.5.0
ID                    BASE
Build Level           gm1319.01
Build Date            5/14/13
Package               com.ibm.websphere.DEVELOPERS.v85_8.5.5000.20130514_1044
Architecture          x86-64 (64 bit)
Installed Features    IBM 64-bit WebSphere SDK for Java
                      WebSphere Application Server Full Profile
                      EJBDeploy tool for pre-EJB 3.0 modules
                      Embeddable EJB container
                      Sample applications
                      Stand-alone thin clients and resource adapters

--------------------------------------------------------------------------------

1 个答案:

答案 0 :(得分:2)

我能够解决这个问题。安装IBM SDK 7后,我没有更新ApplicationServer设置。我们需要将JDK 7更新为应用程序服务器上的默认值。您可以按照以下路径达到此目的:服务器 - > WebSphere应用程序服务器 - > server1(或服务器的名称) - > Java SDK。它将显示图像,并将所需的JDK设置为默认值。

enter image description here