问题描述
ognl-3.0.6.jarstruts的版本是2.3.14错误如下:[13-12-2721:16:42:584CST]0000002dwebappEcom.ibm.ws.webcontainer.webapp.WebApplogErrorSRVE0293E:[Servlet错误]-[ognl/PropertyAccessor]:java.lang.NoClassDefFoundError:ognl/PropertyAccessoratcom.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:318)atcom.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:221)atcom.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)atorg.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)atorg.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)atorg.wf.report.util.JLTFilterDispatcher.initDispatcher(JLTFilterDispatcher.java:57)atorg.wf.report.util.JLTFilterDispatcher.init(JLTFilterDispatcher.java:33)atcom.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:142)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:548)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:462)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:379)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:860)atcom.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)atcom.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1078)atcom.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:998)atcom.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)atcom.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)atcom.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:942)atcom.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)atcom.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)atcom.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)atcom.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)atcom.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)atcom.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)atcom.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)atcom.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)atcom.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)atcom.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)atcom.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)atcom.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
试过的方法:1、把ognl这个包放到公共库中2、升级ongl包
解决方案
解决方案二:
包不兼容问题
解决方案三:
能描述你的部署包结构吗?是否只有这个包找不到?最大的可能是classloader没有找到这个class,可以尝试定义下从父路径加载。
解决方案四:
应该是包冲突,直接把这个包去掉试试
解决方案五:
was问题一定要说明,was的版本号,否则很难定位问题的