部署期间发生错误:部署应用程序时发生异常:UnsupportedClassVersionError [英] Error occurred during deployment: Exception while deploying the app : UnsupportedClassVersionError

查看:71
本文介绍了部署期间发生错误:部署应用程序时发生异常:UnsupportedClassVersionError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

                               An error has occurred

部署期间发生错误:部署应用程序时发生异常[EnterpriseApplication1]:UnsupportedClassVersionError:类别mn.interactive.module.meta.dao.MetaDataDao具有不受支持的主要或次要版本号,该版本号大于Java运行时环境中的版本号.版本1.7.0_02.请参阅server.log以获取更多详细信息.

将EnterpriseApplication1.ear文件上载到GlassFish Service中时. 如何解决此错误?

解决方案

您正在使用1.7.0_02执行GlassFish-但也许您是使用JDK 8编译的?

您可以在较新的JRE中执行较旧的Java类,但反之则不能.因此,只需安装最新的JRE或使用用于编译代码的JDK显式启动GlassFish(或运行它的IDE)即可.

                               An error has occurred

Error occurred during deployment: Exception while deploying the app [EnterpriseApplication1] : UnsupportedClassVersionError: Class mn.interactive.module.meta.dao.MetaDataDao has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.7.0_02. Please see server.log for more details.

When upload EnterpriseApplication1.ear file into GlassFish Service. How to solve this error?

解决方案

You are executing your GlassFish with 1.7.0_02 - but maybe you compiled it with a JDK 8?

You can execute older java classes in newer JREs, but not the other way round. So just install a recent JRE or explicitely start you GlassFish (or the IDE it is running in) with the JDK you use for compiling your code.

这篇关于部署期间发生错误:部署应用程序时发生异常:UnsupportedClassVersionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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