部署期间发生错误:部署应用程序时发生异常:UnsupportedClassVersionError [英] Error occurred during deployment: Exception while deploying the app : 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屋!