没有jdk1.7但有错误不支持major.minor版本51.0

时间:2017-11-10 04:39:44

标签: eclipse egit jdk1.6

我使用eclipse与JDK1.6和webLogic12,也使用egit来控制源,我的PC上没有任何JDK1.7,但是当我启动服务器时,我得到如下错误,我该怎么办?

<2017/11/10 13:31:50 JST> <Error> <HTTP> <BEA-101371>Error: Class bytes found but defineClass()failed for: 'MyLogin'> 
<2017/11/10 13:31:50 JST> <Error> <Deployer> <BEA-149265> Error: Class bytes found but defineClass()failed for: 'MyLogin''
weblogic.application.ModuleException: Error: Class bytes found but defineClass()failed for: 'MyLogin'
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:732)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:188)
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:83)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.UnsupportedClassVersionError: MyLogin : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)

1 个答案:

答案 0 :(得分:0)

我得到的回答如下enter link description here

In Servers view, right click on 12c node | Properties 
WebLogic | Publishing, switch to "Publish as an exploded archive" - Click OK
Re-publish your app