溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

【W(wǎng)eblogic】java.lang.UnsupportedClassVersionError問(wèn)題處理方案

發(fā)布時(shí)間:2020-08-14 04:58:40 來(lái)源:ITPUB博客 閱讀:226 作者:neverinit 欄目:編程語(yǔ)言

開發(fā)人員對(duì)Java程序版本更新之后,重啟Weblogic,發(fā)現(xiàn)java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0錯(cuò)誤,主要錯(cuò)誤信息如下:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pageCond': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.bocom.jump.bp.service.sqlmap.SqlMap com.bocom.training.jump.common.dao.BaseDao.sqlMap; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl] for bean with name 'queryUniqueCodeService' defined in class path resource [config/webservice-beans.xml]; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl'
……
Caused By: org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.bocom.jump.bp.service.sqlmap.SqlMap com.bocom.training.jump.common.dao.BaseDao.sqlMap; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl] for bean with name 'queryUniqueCodeService' defined in class path resource [config/webservice-beans.xml]; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl'
……
Caused By: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl] for bean with name 'queryUniqueCodeService' defined in class path resource [config/webservice-beans.xml]; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl'
……
Caused By: java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.bocom.feps.webservices.accounting.service.impl.QueryUniqueCodeServiceImpl'
……
Caused By: java.lang.UnsupportedClassVersionError: com/bocom/feps/webservices/accounting/service/impl/QueryUniqueCodeServiceImpl : Unsupported major.minor version 51.0
……

經(jīng)過(guò)查詢MOS發(fā)現(xiàn),該問(wèn)題屬于JDK沖突問(wèn)題, 應(yīng)用程序是使用JDK構(gòu)建的,Weblogic環(huán)境中安裝的JDK不支持該應(yīng)用程序。 為避免異常,需要使用正確的JDK版本構(gòu)建應(yīng)用程序。

經(jīng)與開發(fā)人員溝通,開發(fā)人員使用Weblogic環(huán)境中對(duì)應(yīng)版本的JDK重新構(gòu)建應(yīng)用,然后更新之后問(wèn)題順利處理。


附MOS原文

UnsupportedClassVersionError: Unable to set the activation state to true for the application (文檔 ID 2132881.1) 【W(wǎng)eblogic】java.lang.UnsupportedClassVersionError問(wèn)題處理方案 轉(zhuǎn)到底部 【W(wǎng)eblogic】java.lang.UnsupportedClassVersionError問(wèn)題處理方案

【W(wǎng)eblogic】java.lang.UnsupportedClassVersionError問(wèn)題處理方案

In this Document

GoalSolution


APPLIES TO:

Oracle WebLogic Server - Version 11.1.1.5.0 and later
Information in this document applies to any platform.

GOAL

UnsupportedClassVersionError exception when deploying new application on Weblogic server.

####<Feb 11, 2016 10:15:04 AM EST> <Error> <HTTP> <******> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1455203704171> <BEA-101165> <Could not load user defined filter in web.xml: ServletContext@6640065[app:*****_war module:******.war path:/****** spec-version:2.5] info.***.webapp.filters.PathFilter.
java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'info.***.webapp.filters.PathFilter'
......
java.lang.UnsupportedClassVersionError: info/***/webapp/filters/PathFilter : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:344)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:301)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:36)

 

SOLUTION

This is a JDK conflict issue.   The application is built with JDK that is not supported by the JDK installed in the Weblogic environment. To avoid the exception, please build your application with correct JDK version.


向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI