1

我有一个在 WebSphere 7 上运行的 struts2 应用程序。我最近向这个(预先存在的应用程序)添加了一个特性,并且遇到了一个不寻常的问题。当我在 3 中大约 1 次启动新操作时,我收到下面列出的错误。如果我得到它一次,那以后我每次都会得到它。但是,如果我打开应用程序的首页并返回(即,重置大部分应用程序状态,但不触及服务器),它通常可以工作(我们基本上得到一个新的 1 比 3“滚动”)。此功能的子操作也会发生这种情况。

堆栈跟踪:

[9/9/13 12:51:32:289 EDT] 00000028 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet Error]-[Unable to instantiate Action, com.sssa.ebb.web.actions.common.GeneralNotesAction,  defined for 'GeneralNotesUpdateNote' in namespace '/'null]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: Unable to instantiate Action, com.sssa.ebb.web.actions.common.GeneralNotesAction,  defined for 'GeneralNotesUpdateNote' in namespace '/'null
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:637)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187)
at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:839)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:533)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:963)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
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.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

我已经加载了 struts 源代码,原来的错误似乎是 NPE(重新)读取配置。为什么这有时有效而不是其他有效,这很奇怪。

修剪后的 struts.xml:

<?xml version="1.0" encoding="UTF-8" ?>

<constant name="struts.custom.i18n.resources" value="com.sssa.ebb.core.utils.EbbResourceBundle" />
<constant name="struts.enable.SlashesInActionNames" value="true" />
<constant name="struts.mapper.alwaysSelectFullNamespace" value="false" />
<constant name="struts.action.excludePattern" value="/loadImage|/SaveReviewCaseServlet|/getFile|/displayPDF"></constant>

    <include file="struts-default.xml"/>
    <include file="decisions.xml"/>

<package name="default" extends="json-default" >
    <result-types>
        <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
        <result-type name="json" class="org.apache.struts2.json.JSONResult"/>
    </result-types>

    <interceptors>
        <interceptor name="userProfile" class="com.sssa.ebb.web.interceptors.UserProfileInterceptor"/>
        <interceptor name="timeActions" class="com.sssa.ebb.web.interceptors.EbbActionTimerInterceptor"/>
        <interceptor name="valueStackManipulator" class="com.sssa.ebb.web.interceptors.ValueStackInterceptor"/>
        <interceptor name="actionHistoryRecorder" class="com.sssa.ebb.web.interceptors.ActionHistoryInterceptor"/>
        <interceptor name="cachingHeadersInterceptor" class="com.sssa.ebb.web.interceptors.CachingHeadersInterceptor"/>

        <interceptor-stack name="ebb_default_stack">
            <interceptor-ref name="timeActions"/>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="userProfile"/>
            <interceptor-ref name="valueStackManipulator"/>
            <interceptor-ref name="actionHistoryRecorder"/>
            <interceptor-ref name="cachingHeadersInterceptor"/>
        </interceptor-stack>
    </interceptors>

    <default-interceptor-ref name="ebb_default_stack"/>

    <global-results>
        <result name="shutdown" >/jsps/common/shutdown.jsp</result>
        <result name="ebbSearch" >/jsps/caseselection/ebbSearch.jsp</result>
        <result name="ebbForward" type="redirectAction">
            <param name="actionName">${forwardAction}</param>
        </result>
        <result name="systemerror" >/jsps/common/systemerror.jsp</result>
        <result name="applicationerror" >/jsps/common/applicationerror.jsp</result>
        <result name="systemfailure" >/jsps/common/systemfailure.jsp</result>
    </global-results>

    <global-exception-mappings>
        <exception-mapping exception="com.sssa.ebb.ejb.exceptions.EbbEJBException" result="systemerror" />
        <exception-mapping exception="java.lang.Exception" result="systemfailure" />
    </global-exception-mappings>


    <action name="exitAction" class="com.sssa.ebb.web.actions.common.ExitAction">
        <result name="success" type="tiles">exitApplication</result>
    </action>

    <action name="enterEbbSearch" class="com.sssa.ebb.web.actions.common.EbbSearchAction">
        <result>/jsps/caseselection/ebbSearch.jsp</result>
    </action>

    <action name="openGeneralNotes" class="com.sssa.ebb.web.actions.common.GeneralNotesAction">
        <result name="success">/jsps/common/generalnotes.jsp</result>
        <result name="viewpage">/jsps/common/generalnotes.jsp</result>

    </action>

    <action name="GeneralNotesAddNote" class="com.sssa.ebb.web.actions.common.GeneralNotesAction" method="addNote">
        <result type="json">
             <param name="root">jsonResponse</param>
        </result>
    </action>   

    <action name="GeneralNotesUpdateNote" class="com.sssa.ebb.web.actions.common.GeneralNotesAction" method="updateNote">
        <result type="json">
             <param name="root">jsonResponse</param>
        </result>
    </action>   

    <action name="GeneralNotesDeleteNote" class="com.sssa.ebb.web.actions.common.GeneralNotesAction" method="deleteNote">
    </action>   

</package>

不确定要添加什么,TIA。

4

0 回答 0