下面是我的控制器代碼,它返回一個視圖。 如果我部署並運行在Tomcat 7上,它的工作非常完美,但問題在Websphere上部署時仍然存在。Websphere上的BeanELResolver錯誤
@RequestMapping(value = "/review_and_confirm_travel_detail.html", method = RequestMethod.POST)
public ModelAndView confirmTravelDetails(@ModelAttribute ViewQuote viewQuote ,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse, Model model) throws Exception {
ArrayList<String> stopsList = new ArrayList<String>();
RequestBuilderUtil.getStopsRequestString(viewQuote.getStopsValuesForRequest() , stopsList , this);
List<String > specialInputList = getSpecialInputString(viewQuote.getSpecialInputs());
List<String> specialInputValues = getSpecialInputString(viewQuote.getSpecialInputValues());
Map<String , String > spInputMap =getSpecialInputMap(viewQuote.getSpecialInputs(), viewQuote.getSpecialInputValues());
ModelAndView modelAndView = new ModelAndView("review_and_confirm_travel_detail");
modelAndView.addObject("specialInputList", specialInputList);
modelAndView.addObject("specialInputValues", specialInputValues);
modelAndView.addObject("specialInputMap", spInputMap);
modelAndView.addObject("stopsList", stopsList);
return modelAndView;
}
此外,以下是導致錯誤的JSP部分。
<div class="table_review_confirm_travel_left">
<table id= "specialInputTable"align="center" valign="top" cellpadding="3" cellspacing="0" border="0" class="td-padding1">
<tr><td colspan="2" style="padding-left:5px; background-color:#e1e1e1;font-weight:bold">
Special Inputs
</td>
</tr>
<core:forEach items="${specialInputMap}" var= "spInput">
<core:if test="${!spInput.equals('')}">
<tr><td nowrap style="padding-left: 20px;">
${spInput.key}
</td>
<td nowrap style="padding-left: 10px;">
<input id ="specialInputName" type="hidden" name="specialInputName" value="${spInput.key}">
<input type="text" placeholder="${spInput.value}" name="specialInputValue" onkeypress="return validateAlphaNumeric(event)">
</td>
</tr>
</core:if>
<!-- <script type="text/javascript" charset="utf-8">
var inputName ="";
$(function() {
var specialInputName = document.getElementById('specialInputName');
inputName = inputName + specialInputName.value();
});
</script> -->
</core:forEach>
</table>
</div>
你可以去,雖然下面的行,這些都是錯誤日誌從服務器:
[14年2月23日23:40:06:697 EST] 00000166的servletËCOM .ibm.ws.webcontainer.servlet.ServletWrapper服務SRVE0068E:應用程序[CESDirect_war]中servlet的一個服務方法[/WEB-INF/views/review_and_confirm_travel_detail.jsp]拋出異常。創建的異常:[javax.el.ELException:java.lang.IllegalAccessException:類javax.el.BeanELResolver無法訪問類java.util.MapEntry的成員,其修飾符爲「public」 at javax.el.BeanELResolver.invoke(BeanELResolver的.java:480) 在javax.el.CompositeELResolver.invoke(CompositeELResolver.java:137) 在org.apache.el.parser.AstValue.getValue(AstValue.java:162) 在org.apache.el.parser .AstNot.getValue(AstNot.java:44) 在org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:283) 在org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:778) at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_6(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:565) com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_forEach_1(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:613) 在com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_5(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:657) 在com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_form_form_0(_review_5F_and_5F_confirm_5F_travel_5F_detail。的java:952) 在com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspService(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:267) 在com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99) 在的javax.servlet。 http.HttpServlet.service(HttpServlet.java:668) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) at com.ibm。 ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext。 AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:216) 在com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032) 在com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher。 java:1384) at com.ibm.ws.webcontainer.webapp.WebAp pRequestDispatcher.forward(WebAppRequestDispatcher.java:193) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) at org.springframework.web.servlet.view.AbstractView.render(AbstractView。 java:250) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801) at org.springframework。 web.servlet.DispatcherServlet。(org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service( ServletWrapper.java:1224) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032) 在com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) 在com.ibm。 (com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready( WCChannelLink.java:195) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink。 handleNewRequest(HttpInboundLink.java:526) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 在com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 在com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 在com.ibm.io.async.AsyncChannelFuture處的com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) $ 1.run(AsyncChannelFuture.java:205) at com.ibm.ws.util.ThreadPool $ Worker.run(ThreadPool.java:1814) 引發:java.lang.IllegalAccessException:類javax.el.BeanELResolver不能在java.lang.reflect.Method.invoke(Method.java:602) 處使用修飾符「public」 訪問sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77) 處的類java.util.MapEntry的成員在javax.el.BeanELResolver.invoke(BeanELResolver.java:476) ...... 49多個 ]
[2/23/14 23:40:06:701 EST] 00000166 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[2/23/14 23:40:06:706 EST] 00000166 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause dispatcher: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.el.ELException: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.MapEntry with modifiers "public"
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814)
Caused by: javax.el.ELException: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.MapEntry with modifiers "public"
at javax.el.BeanELResolver.invoke(BeanELResolver.java:480)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:137)
at org.apache.el.parser.AstValue.getValue(AstValue.java:162)
at org.apache.el.parser.AstNot.getValue(AstNot.java:44)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:283)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:778)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_6(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:565)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_forEach_1(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:613)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_5(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:657)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_form_form_0(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:952)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspService(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:267)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:216)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:193)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
... 22 more
Caused by: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.MapEntry with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77)
at java.lang.reflect.Method.invoke(Method.java:602)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:476)
... 49 more
[2/23/14 23:40:06:741 EST] 00000166 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[dispatcher]: javax.el.ELException: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.MapEntry with modifiers "public"
at javax.el.BeanELResolver.invoke(BeanELResolver.java:480)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:137)
at org.apache.el.parser.AstValue.getValue(AstValue.java:162)
at org.apache.el.parser.AstNot.getValue(AstNot.java:44)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:283)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:778)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_6(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:565)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_forEach_1(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:613)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_core_if_5(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:657)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspx_meth_form_form_0(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:952)
at com.ibm._jsp._review_5F_and_5F_confirm_5F_travel_5F_detail._jspService(_review_5F_and_5F_confirm_5F_travel_5F_detail.java:267)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:216)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:193)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1814)
Caused by: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.MapEntry with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77)
at java.lang.reflect.Method.invoke(Method.java:602)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:476)
... 49 more