项目启动异常日志

[21-11-18 23:46:58:166 CST] 00000020 DispatcherSer I org.springframework.web.servlet.FrameworkServlet initServletBean FrameworkServlet 'dispatcher': initialization started

[21-11-18 23:46:58:166 CST] 00000020 DispatcherSer E org.springframework.web.servlet.FrameworkServlet initServletBean Context initialization failed

                                 org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/was/IBM/WebSphere/AppServer/profiles/installedApps/dmgrCell01/server_war_war.ear/server_war.war/WEB-INF/classes/com/module/mobapp/inventory/service/InventoryManager.class]; nested exception is java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/module/mobapp/common/utils/ContextMeta, offset=6

        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237)

        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:204)

        at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)

        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)

        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)

        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)

        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:136)

        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)

        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)

        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)

        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)

        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458)

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)

        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

        at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1721)

        at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:388)

        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)

        at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)

        at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)

        at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:732)

        at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:617)

        at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)

        at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)

        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1146)

        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1320)

        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)

        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:945)

        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:759)

        at com.ibm.ws.runtime.component.ApplicationMgrImpl$3.run(ApplicationMgrImpl.java:2082)

        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5398)

        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5486)

        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)

        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2087)

        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:434)

        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)

        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:377)

        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:123)

        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:944)

        at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:496)

        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)

Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/module/mobapp/common/utils/ContextMeta, offset=6

关键:
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/module/mobapp/common/utils/ContextMeta, offset=6

问题分析:
由于该项目是在jdk1.8平台编译打包,而was环境只能支持运行jdk1.6平台

解决方案:
idea中将jdk版本换成1.6, 重新进行编译打包即可