简体   繁体   中英

Java-application log error

I am getting the following error once i deploy my EAR file to the server. Since I am new to JAVA i am unable to figure out what could fix this issue. Any help is much appreciated.

I have tried changing the Compiler version too, but that does not seem to help either. Also, the error is as below.

[2017-10-04 14:23:24,716] org.springframework.web.context.ContextLoader#initWebApplicationContext


ERROR: Context initialization failed    

       org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.sl.was.cashpayment.jms.JMSApplicationListener] for bean with name 'applicationListener' defined in ServletContext resource [/WEB-INF/classes/config/spring/applicationContext-jms.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/sl/was/cashpayment/jms/JMSApplicationListener, offset=6
                at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
                at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1304)
                at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:870)
                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
                at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
                at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1732)
                at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
                at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
                at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
                at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
                at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
                at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
                at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1201)
                at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1390)
                at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
                at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:979)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:785)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1403)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2214)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
                at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653)
                at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5487)
                at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5613)
                at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667)
                at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611)
                at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1293)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
                at java.lang.reflect.Method.invoke(Method.java:611)
                at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)
                at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
                at java.lang.reflect.Method.invoke(Method.java:611)
                at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)
                at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1152)
                at java.security.AccessController.doPrivileged(AccessController.java:424)
                at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
                at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
                at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1146)
                at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:999)
                at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:847)
                at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)
                at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350)
                at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
                at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243)
                at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
                at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
                at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360)
                at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602)
                at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1820)
                at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
                at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
                at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
                at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
                at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

Your class was compiled against a higher Java version than your server is running on. WebSphere 7.0 and 8.0 (and 8.5, out of the box) run on Java 6, so my guess is that your class was compiled with Java 7 or above. Java is backward-compatible but not forward-compatible - you can't run newer-spec classes on an older-spec JVM.

The simplest solution is to recompile your classes with Java 6. Alternately, if you're running WebSphere 8.5.5, you can switch your server to run on Java 8 using the "managesdk" script in WebSphere's bin directory (assuming you installed the Java 8 package with the server).

I think that the problem is that the server runs on Java version previous to a version you compiled with. EG compiled with java7 and server runs on java6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM